Optical sensing device
Through the combination of optical sensing devices and pressure sensors, the problem that traditional machines cannot detect the water level of the container is solved, and the rapid and accurate measurement of the water level of the liquid in the container is achieved. It is suitable for machines such as water dispensers and coffee machines.
Patent Information
- Application Number
- CN202110234890.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-10-15
- Filing Date
- 2021-03-03
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2041-03-03
AI Technical Summary
Traditional water dispensers and coffee machines cannot accurately detect the water level and remaining capacity in the container, causing users to need manual operations to avoid liquid spills.
An optical sensing device, including a linear light source and an optical sensing array, uses a long strip of detection light reflected by the target container, calculates the size and liquid level information of the container, and combines a pressure sensor to detect the weight change of the container to achieve accurate measurement of the liquid water level height.
It realizes rapid and accurate calculation of the water level of the liquid in the container to avoid liquid overflow and is suitable for water dispensers, coffee machines and other machines.
Smart Images

Figure CN114370911B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an optical sensing device, in particular to an optical sensing device for detecting the size of a target container or the water level thereof. Background Art
[0002] Traditional water dispensers cannot detect the water level within a container. Users must visually observe the container and manually control the dispenser's water button to prevent overflow. Traditional coffee machines use proximity or ultrasonic sensors to detect whether a container is placed in the dispenser; however, these sensors are unable to detect the remaining volume or the liquid level within the container. Therefore, designing a liquid detection device that can utilize optical detection technology to detect the remaining volume and liquid level within a container, thereby enhancing the functionality of water dispensers or coffee machines, has become a development goal of the optical detection industry. Summary of the Invention
[0003] The invention relates to an optical sensing device for detecting the size of a target container or the water level thereof.
[0004] The present invention further discloses an optical sensing device for detecting a target container. The optical sensing device includes a line light source, an optical sensor array, and a processor. The line light source projects a long strip of illumination light onto the target container. The optical sensor array includes a plurality of sensor units arranged in a long strip shape, which receive the long strip of detection light reflected from the target container. The processor is electrically connected to the optical sensor array. The processor analyzes the brightness distribution of the long strip of detection light received by the plurality of sensor units to determine the relative distance between the optical sensor array and the rim of the target container.
[0005] The present invention further discloses that the elongated detection light is divided into multiple segments, each reflected from a plurality of blocks of the target container and received by the plurality of sensor units. The processor further analyzes the brightness of the multiple segments to calculate the distance change between the optical sensor array and the multiple segments, thereby obtaining the contours of the multiple blocks. The processor further analyzes the contours of the multiple blocks to obtain depth change information within the cup rim, and determines whether the liquid in the target container contains any extraneous objects based on this depth change information. The distance change is a combination of multiple relative distances between each block and a corresponding sensor unit.
[0006] The present invention further discloses that the processor divides the brightness distribution into a first region having a maximum calculated brightness value and a second region having a minimum calculated brightness value, and analyzes the first and second regions to determine the height of the target container using the height difference between the cup rim and the support surface on which the target container is located. The processor divides the brightness distribution into the first region, the second region, and a third region, wherein the third region has a calculated brightness value between the maximum calculated brightness value and the minimum calculated brightness value, and further analyzes the third region to determine the remaining capacity of the target container using the height difference between the cup rim and the base of the target container.
[0007] The present invention further discloses that the processor further analyzes the brightness difference between the multiple segments, finds out the segment with abnormal optical parameters and regards it as the base of the target container, so as to use the segment with abnormal optical parameters to determine the remaining capacity of the target container.
[0008] The present invention further discloses that the optical sensing device further includes a memory module electrically connected to the processor for storing optical parameters of multiple liquids. The processor further utilizes analysis and compensation of the brightness distribution and the optical parameters to calculate the relative distance between the optical sensing array and the liquid in the target container. The processor further analyzes the image generated by the brightness distribution conversion and uses the geometric center information of the image to determine the numerical range of the optical parameters, thereby confirming the type of the liquid. The optical parameters are one or more of reflectivity, refractive index, and absorptivity. The mouth of the target container is surrounded by the rim and points toward the optical sensing array. The liquid is contained within the target container and is exposed through the mouth.
[0009] The present invention further discloses that the processor further identifies the rim and base of the target container and calculates the rim's diameter using the relative distance between the optical sensor array and the rim. A point perpendicular to the plane on which the optical sensor array is projected relative to the rim is considered an alignment point. The processor analyzes the viewing angle of the optical sensor array to determine a field of view distance between the alignment point and a boundary of the viewing angle. Using this field of view distance, the processor calculates the distance between the rim and the alignment point, thereby correspondingly determining the diameter.
[0010] The present invention further discloses that the optical sensing device further includes a pressure sensor electrically connected to the processor for detecting the weight of the target container. The optical sensing device further includes a pressure sensor electrically connected to the processor for detecting the weight of the target container. When the weight increases and the water level of the liquid in the target container increases, the processor uses the detection results of the optical sensing array as the water level of the liquid. When the weight increases but the water level of the liquid does not increase, the processor uses the detection results of the pressure sensor and the optical sensing array as the water level of the liquid.
[0011] The present invention further discloses that the line light source includes a long strip-shaped light emitting unit for emitting the long strip-shaped illumination light. The line light source includes a plurality of adjacently arranged light emitting units for emitting the long strip-shaped illumination light. The optical sensor array is an Mx1 array, where M is a positive integer, or an MxN array, where both M and N are positive integers.
[0012] The present invention further discloses that the optical sensing device further includes a rotation motor for supporting and rotating the line light source or the target container so that the line light source can scan the target container. Alternatively, the optical sensing device further includes a movement motor for supporting and moving the line light source or the target container so that the line light source can scan the target container.
[0013] The present invention also discloses an optical sensing device for detecting a target container. The optical sensing device includes a light source, an optical sensor array, and a processor. The light source projects illumination light onto the target container. The optical sensor array receives detection light reflected from the target container. The processor is electrically connected to the optical sensor array. The processor analyzes the brightness distribution of the detection light to identify two or more first brightness regions, and determines the radial dimension of the target container based on the spacing between these first brightness regions.
[0014] The present invention also discloses an optical sensing device for detecting a target container. The optical sensing device includes a first line light source, a second line light source, an optical sensing array, and a processor. The first line light source is configured to project a first elongated strip of illumination light onto the target container. The second line light source is configured to project a second elongated strip of illumination light onto the target container in a direction different from the first elongated strip of illumination light. The optical sensing array is configured to receive the first elongated strip of detection light and the second elongated strip of detection light generated by reflection from the target container. The processor is electrically connected to the optical sensing array. The processor analyzes the brightness distribution of the first elongated strip of detection light and the second elongated strip of detection light to determine the relative distance between the target container and the optical sensing array.
[0015] The optical sensing device of the present invention can determine the height and diameter of the target container by projecting images captured by a line or point light source onto the target container and the support surface. If the optical parameters of the liquid in the target container, such as refractive index, reflectivity, and absorptivity, are known, these optical parameters can be further used to compensate for the calculated liquid level. Furthermore, the optical sensing device can utilize a pressure sensor to detect changes in the weight of the liquid injected into the target container. The diameter of the target container can then be determined using the number of pixels in the optical sensor array and the height of the optical sensor array relative to the rim of the target container. The device can then analyze the increased weight and density of the injected liquid, as well as the diameter of the target container, to calculate the liquid level within the target container.
[0016] The optical sensing device can simultaneously utilize an optical sensor array and a pressure sensor to detect the liquid within a target container. If the optical sensing device detects a rise in the water level of the injected liquid and an increase in the weight of the target container, this indicates that the injected liquid may be dark or non-transparent (e.g., coffee). The optical sensing array can then accurately measure the water level of the injected liquid. If the optical sensing device does not detect a rise in the water level of the injected liquid, or detects a slow or non-linear rise in the water level of the injected liquid, while the weight of the target container continues to increase, this indicates that the injected liquid may be light-colored or transparent (e.g., water). A pressure sensor must then be further utilized to assist the optical sensing array in measuring the correct water level of the injected liquid. Compared to conventional technologies, the optical sensing device of the present invention can be used in machines such as water dispensers, coffee machines, or soda machines. It can quickly and accurately calculate the water level of the injected liquid within the target container, effectively estimating the machine's water output to prevent the injected liquid from overflowing the target container. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 FIG. 4 is a functional block diagram of an optical sensing device according to an embodiment of the present invention.
[0018] Figure 2 FIG. 4 is a schematic diagram of the appearance of an optical sensing device according to an embodiment of the present invention.
[0019] Figure 3 and Figure 4 Schematic diagrams of line light sources according to different embodiments of the present invention.
[0020] Figure 5 FIG. 1 is a partially enlarged schematic diagram of an optical sensing device and a target container according to an embodiment of the present invention.
[0021] Figure 6 FIG. 1 is a schematic diagram of an image captured by an optical sensor array according to an embodiment of the present invention.
[0022] Figure 7 A schematic diagram of a distribution curve generated by image conversion according to an embodiment of the present invention.
[0023] Figure 8 FIG. 1 is a schematic diagram of an optical sensing device and a target container in a detection phase according to another embodiment of the present invention.
[0024] Figure 9 and Figure 10 Schematic diagram of an optical sensing device according to another embodiment of the present invention.
[0025] Figure 11 FIG. 4 is a functional block diagram of an optical sensing device according to another embodiment of the present invention.
[0026] Figure 12FIG. 1 is a schematic diagram of an image captured by an optical sensing device according to another embodiment of the present invention.
[0027] Figure 13 A schematic diagram of a distribution curve generated by image conversion according to another embodiment of the present invention.
[0028] Figure 14 FIG. 4 is a schematic diagram of an optical sensing device and a target container according to another embodiment of the present invention.
[0029] Figure 15 and Figure 16 Schematic diagram of images obtained by the optical sensor array for different liquids according to an embodiment of the present invention.
[0030] Figure 17 A schematic diagram of a distribution curve generated by image conversion according to another embodiment of the present invention.
[0031] Figure 18 FIG. 4 is a functional block diagram of an optical sensing device according to another embodiment of the present invention.
[0032] Figure 19 and Figure 20 FIG2 is a schematic diagram of an optical sensing device detecting a target container according to another embodiment of the present invention.
[0033] The description of the accompanying drawings is as follows:
[0034] 10, 10', 10", 10A, 10B optical sensing devices
[0035] 12 Target Container
[0036] 121 Cup Rim
[0037] 122 cup rim
[0038] 14, 14A Linear Light Source
[0039] 141 strip light emitting units
[0040] 142 multiple light-emitting units
[0041] 16, 16A optical sensor array
[0042] 161 sensor unit
[0043] 18 memory modules
[0044] 20, 20A processors
[0045] 22 pressure sensor
[0046] 24 Rotary Motor
[0047] 26 mobile motor
[0048] 30 First Light Source
[0049] 32 Second Light Source
[0050] 34 optical sensor arrays
[0051] 36 processors
[0052] S Loading plane
[0053] S1~Sn blocks
[0054] Sa and Sb blocks
[0055] S1_1~S1_n blocks
[0056] S2_1~S2_n blocks
[0057] I, I1, I2, I' image
[0058] C, C' distribution curve
[0059] Ca, Cb corresponding points
[0060] R1 First Area
[0061] R2 Second Area
[0062] R3 Third Area
[0063] B Long strip detection light
[0064] B1~Bn section
[0065] P Snap Point
[0066] D1 First distance
[0067] D2 Second distance
[0068] D3 Third distance
[0069] G1 First Gap
[0070] FOV field of view
[0071] W1 target container width
[0072] W2 liquid surface width
[0073] A1 cup
[0074] A2 cup bottom
[0075] A3 Liquid Level
[0076] P1-1~P1-n reflection points
[0077] P2-1~P2-n reflection points
[0078] Pi_1, Pi_2, Pi_3, Pi_4 intersection point DETAILED DESCRIPTION
[0079] See also Figure 1 and Figure 2 , Figure 1 is a functional block diagram of an optical sensing device 10 according to an embodiment of the present invention. Figure 2 Figure 1 is a schematic diagram of the appearance of an optical sensing device 10 according to an embodiment of the present invention. The optical sensing device 10 can be used in machines such as water dispensers and coffee machines. It can not only detect the presence of a target container 12, but also its size and the level of liquid within it. The optical sensing device 10 may include a line light source 14, an optical sensor array 16, a memory module 18, and a processor 20. The line light source 14, optical sensor array 16, and memory module 18 may be electrically connected to the processor 20. The memory module 18 is an optional component of the optical sensing device 10.
[0080] See also Figure 3 and Figure 4 , Figure 3 and Figure 4 Schematic diagram of the line light source 14 according to different embodiments of the present invention. Figure 3 As shown, the line light source 14 may have a single strip-shaped light emitting unit 141 for generating and projecting a long strip of illumination light onto the target container 12. Figure 4 As shown, the line light source 14 may also include multiple light-emitting units 142 arranged laterally, and the multiple light-emitting units 142 each output a small-sized illumination light, which is combined to form a long strip of illumination light to be projected onto the target container 12. The length of the long strip of illumination light is preferably greater than the width of the target container 12, which means that the long strip of illumination light will simultaneously illuminate the target container 12 and the supporting surface S on which the target container 12 is located.
[0081] The optical sensor array 16 may include a plurality of sensor units 161 arranged in a stripe pattern to receive the stripe-shaped detection light. The optical sensor array 16 can be designed as an Mx1 array, with parameter M being a positive integer, to match the stripe-shaped detection light pattern. Alternatively, the optical sensor array 16 can be slightly widened to form an MxN array, with parameters M and N both being positive integers. The number of sensor units 161 depends on the size of the detection area on the support surface S for placing the target container 12. Specifically, the larger the possible size of the target container 12, the greater the number of sensor units 161 needed to expand the detectable range of the optical sensor array 16. The optical sensor array 16 is configured to receive the stripe-shaped detection light generated by the reflection of the stripe-shaped illumination light projected onto the target container 12. The processor 20 can analyze the brightness distribution generated by the plurality of sensor units 161 to determine the relative distance between the optical sensor array 16 and the target container 12. The relative distance can be further converted into the size (width and height) of the target container 12 and the height of the liquid level injected into the target container 12 .
[0082] See also Figures 5 to 7 , Figure 5 FIG. 1 is a partially enlarged schematic diagram of the optical sensing device 10 and the target container 12 according to an embodiment of the present invention. Figure 6 is a schematic diagram of an image I obtained by the optical sensor array 16 according to an embodiment of the present invention. Figure 7 A schematic diagram of a distribution curve C generated by converting an image I according to an embodiment of the present invention. In one possible implementation of the present invention, after the optical sensor array 16 receives the elongated detection light B, the optical sensor device 10 may divide the elongated detection light B into a plurality of segments B1-Bn, which are projected onto a plurality of blocks S1-Sn of the target container 12 (and / or the support surface S). The brightness of each segment is analyzed to calculate the relative distance between each sensor unit 161 of the optical sensor array 16 and the corresponding block of the target container 12 (and / or the support surface S). Subsequently, the multiple relative distances calculated for the segments B1-Bn can be converted into the outlines of the target container 12 and the support surface S.
[0083] like Figure 5As shown, the target container 12 may have a rim 121, through which liquid is injected into the interior space of the target container 12. A rim 122 of the target container 12 surrounds the rim 121, and the rim 121 faces the optical sensor array 16, allowing the optical sensor array 16 to capture an image I encompassing both the inside and outside of the rim 121. When the line light source 14 outputs a long strip of illumination light, the rim 122 of the target container 12, the liquid within the rim 121, and the support surface S on which the target container 12 rests reflect the light to generate a long strip of detection light B, which is received by the optical sensor array 16. Therefore, the optical sensor device 10 can obtain the relative distances between the optical sensor array 16 and the surface of the liquid within the rim 122 and rim 121 of the target container 12, as well as the relative distance between the optical sensor array 16 and the support surface S.
[0084] The long strip detection light B can be divided into a plurality of segments B1 to Bn. Each segment is reflected from the target container 12 and / or the plurality of blocks S1 to Sn of the carrier plane S and is received by the plurality of sensor units 161 of the optical sensor array 16. The optical sensor device 10 can analyze the brightness of the segments B1 to Bn received by the plurality of sensor units 161 to obtain the brightness change of the long strip detection light B. Figure 7 As shown, if a segment has high brightness, it indicates that the optical sensor array 16 has a shorter relative distance to its corresponding block, such as the peak of the distribution curve C. If a segment has low brightness, it indicates that the optical sensor array 16 has a longer relative distance to its corresponding block, such as the valley of the distribution curve C. Therefore, the distance change between the optical sensor array 16 and the multiple blocks S1-Sn can be calculated and converted into the outlines of the blocks S1-Sn.
[0085] The distribution curve C can be classified according to the brightness calculation values of all segments B1 to Bn. The brightness calculation value can be the brightness mean or median of a region of the distribution curve C. The definition of the calculation value depends on the design requirements. For example, the distribution curve C can be divided into two regions, such as a first region R1 and a second region R2. The first region R1 can have the largest brightness calculation value and can be considered to correspond to the cup rim 122 of the target container 12. The second region R2 has the smallest brightness calculation value and can be considered to correspond to the support plane S. The optical sensing device 10 can analyze the first region R1 and the second region R2 to calculate the height difference between the cup rim 122 and the support plane S, thereby obtaining the height of the target container 12.
[0086] Furthermore, the distribution curve C can be further divided into three regions: a first region R1, a second region R2, and a third region R3. The calculated brightness value of the third region R3 lies between the maximum and minimum calculated brightness values. Therefore, the location of the third region R3 falls between the two peaks of the first region R1, corresponding to the base of the target container 12. If the target container 12 is empty, the base is the bottom of the target container 12; if the target container 12 is filled with liquid, the base is the surface of the liquid within the target container 12. The optical sensing device 10 analyzes the differences between the first region R1, the second region R2, and the third region R3. Using the height difference between the rim 122 and the base of the target container 12, the remaining capacity of the target container 12 can be calculated given the known height of the target container 12.
[0087] Furthermore, from Figure 7 As can be seen, the first region R1 of the distribution curve C encompasses two peaks, which can be considered as two opposing regions of the rim 122 of the target container 12. Since the number of pixels in the optical sensor array 16 is a known parameter, and the size of the detection area of the support surface (for placing the target container 12) covered by the optical sensor array 16 is also a known parameter, the optical sensor device 10 can estimate the distance between the two opposing regions of the rim 122 (the two peaks in the first region R1) based on the number of pixels between the two peaks in the first region R1 and / or the number of pixels between each peak and the adjacent boundary of the image I, thereby determining the caliber of the target container 12, that is, the size of the rim 121.
[0088] Furthermore, because surface tension is generated when the liquid contacts the inner wall of the target container 12, the liquid in this area has different optical parameters (e.g., reflectivity) than the liquid in other areas. Therefore, the optical sensing device 10 can analyze the brightness differences between the blocks S1-Sn corresponding to the long strip of detection light B, identifying the blocks Sa and Sb with abnormal optical parameters as the base of the target container 12, i.e., the liquid surface. Then, the corresponding points Ca and Cb associated with the blocks Sa and Sb are found on the distribution curve C. The remaining capacity of the target container 12 can be determined based on the height difference between the cup rim 122 and the base of the target container 12, or the difference between the height of the optical sensor array 16 relative to the support plane S and the height of the optical sensor array 16 relative to the base of the target container 12.
[0089] The optical sensing device 10 can further store the optical parameters of a known liquid in the memory module 18. The known liquid may be water, coffee, or a sparkling beverage. Optical parameters include reflectivity, refractive index, and absorptivity. If the target container 12 contains coffee, the reflectivity of the elongated detection light B is high, and the optical sensing device 10 can accurately detect the liquid level in the target container 12. If the target container 12 contains water, the reflectivity of the elongated detection light B is low, and the liquid level detected by the optical sensing device 10 will be inaccurate. In this case, the optical sensing device 10 can use the pre-stored optical parameters in the memory module 18 to compensate for the brightness distribution analysis results, accurately calculating the relative distance between the optical sensing array 16 and the liquid in the target container 12, thereby obtaining the correct liquid level in the target container 12.
[0090] Alternatively, the memory module 18 may also store information about the geometric center distribution of known liquids in the detected image, enabling the optical sensor device 10 to analyze the brightness distribution obtained by the optical sensor array 16 to identify the type of liquid. Please refer to Figures 15 and 16, which are schematic diagrams of images I1 and I2 obtained by the optical sensor array 16 for different liquids according to an embodiment of the present invention. As shown in Figure 15, image I1 is captured when a dark liquid, such as coffee, is poured into the target container 12. Therefore, the bright area within the cup rim 121 is distributed only near the cup rim 122. As shown in Figure 16, image I2 is captured when a transparent liquid, such as water, is poured into the target container 12. The bright area within the cup rim 121 is distributed in the center of the cup rim 121 and near the cup rim 122. Therefore, optical sensor device 10 can analyze the geometric center information of the bright areas of images I1 and I2 and, based on the information stored in memory module 18, determine the range of optical parameters corresponding to the detected geometric center information. This means determining whether the liquid in target container 12 is dark coffee or clear water, thereby confirming the liquid type. The geometric center information can be the center of mass, centroid, or center of gravity, but practical applications are not limited thereto.
[0091] Please also refer to Figures 7 and 17. Figure 17 is a schematic diagram of a distribution curve C' generated by converting image I' according to another embodiment of the present invention. As shown in Figure 7, the distribution curve C is smooth within the third region R3, indicating that the liquid surface in the target container 12 is flat. As shown in Figure 17, the distribution curve C' is rugged within the third region R3, indicating that the liquid surface in the target container 12 has significant ups and downs. Therefore, the optical sensing device 10 can analyze the distribution curves C and C' to obtain the profile represented by the brightness distribution of blocks S1-Sn and convert it into depth variation information within the rim 122. If the depth variation within the rim 122 is minimal, it indicates that only liquid has been added to the target container 12. If the depth variation within the rim 122 is large, it indicates that the target container 12 may contain other objects in addition to the liquid. For example, the other objects may be floating objects such as ice cubes or sugar cubes, or non-floating objects such as a stirring stick or spoon.
[0092] See also Figure 6 and Figure 8 , Figure 8 This diagram illustrates an optical sensing device 10 and a target container 12 during the detection phase according to another embodiment of the present invention. In another possible implementation, after acquiring an image I, the optical sensing device 10 may first identify the rim 122 and the support plane S of the target container 12 based on the brightness distribution in the image I. For example, the first region R1 with the maximum calculated brightness value may be considered the rim 122, while the second region R2 with the minimum calculated brightness value may be considered the support plane S. The optical sensing device 10 may then define an alignment point P within the region where the rim 122 is located. Alignment point P is the perpendicular projection point of the optical sensing array 16 relative to the plane of the rim 122.
[0093] The alignment point P has a first distance D1 relative to the left side of the cup rim 122, and a second distance D2 relative to the right side of the cup rim 122. This means that the distances between the alignment point P and the cup rim 122 on either side of the cup rim are the first and second distances D1 and D2. If the optical sensing device 10 is not pointing directly at the center of the target container 12, the first distance D1 will differ from the second distance D2. After finding the alignment point P, the optical sensing device 10 first retrieves the angle value FOV of the optical sensor array 16 from the memory module 18. It then calculates a third distance D3 between the optical sensor array 16 and the alignment point P within the cup rim 122. A trigonometric formula is then used to calculate a first gap G1 between the alignment point P and the left or right edge of the FOV using the FOV and the third distance D3. In this embodiment, the first gap G1 is calculated as the distance between the alignment point P and the left edge of the FOV, as shown in Formula 1. However, practical applications are not limited to this.
[0094]
[0095] Next, the optical sensing device 10 obtains the first number of pixels N1 between the alignment point P and the left side of the cup rim 122, the second number of pixels N2 between the alignment point P and the right side of the cup rim 122, and the third number of pixels N3 between the alignment point P and the left edge of the viewing angle within the image I. The optical sensing device 10 then calculates a first distance D1 using the first gap G1, the first number of pixels N1, and the third number of pixels N3, as shown in Formula 2. The optical sensing device 10 then calculates a second distance D2 using the first gap G1, the second number of pixels N2, and the third number of pixels N3, as shown in Formula 3. The size of the rim 121 of the target container 12, such as the distance between the left and right sides of the cup rim 122, is the sum of the first distance D1 and the second distance D2.
[0096]
[0097]
[0098] After the optical sensing device 10 detects the presence of the target container 12 and calculates the height and diameter of the target container 12, it can further utilize the pressure sensor 22 to detect the target container 12 and the weight of the liquid contained therein. The pressure sensor 22 can be mounted on the support surface S and electrically connected to the processor 20. When the target container 12 is first placed on the support surface S and has not yet been filled with liquid, the pressure sensor 22 can detect and obtain the empty weight of the target container 12. As the water dispenser or coffee machine continues to fill the target container 12 with liquid, the pressure sensor 22 can detect and obtain the increasing weight of the liquid. Because the type of water dispenser, coffee machine, or soda machine to which the optical sensing device 10 is mounted is known, liquid properties, such as liquid density, can be pre-stored in the memory module 18. This allows the optical sensing device 10 to analyze the diameter Dt of the target container 12, the density Dw of the liquid, and the increasing weight Wl of the liquid to calculate the water level Hl of the liquid in the target container 12, as shown in Equation 4.
[0099]
[0100] See also Figure 9 and Figure 10 , Figure 9 and Figure 10 Schematic diagrams of optical sensing devices 10' and 10" are shown in other embodiments of the present invention. In these two embodiments, components with the same number as those in the previous embodiment have the same structure and function, and are not described again here. Figure 9In the embodiment shown, the optical sensing device 10' may further include a rotary motor 24. The rotary motor 24 may be used to support the line light source 14 or the carrier of the target container 12; it only needs to be provided on one or both of the line light source 14 and the carrier of the target container 12. The carrier is not shown in the figure, but is a component provided on the carrier plane S for supporting the target container 12. The rotary motor 24 can rotate the line light source 14 or the target container 12, so that the long strip illumination light and the long strip detection light can completely scan the target container 12. Figure 10 In the illustrated embodiment, the optical sensing device 10 ″ may further include a moving motor 26 supporting one or both of the line light source 14 and the target container 12 supporting platform for moving the line light source 14 or the target container 12 to completely scan the target container 12 .
[0101] See also Figures 11 to 14 , Figure 11 FIG. 1 is a functional block diagram of an optical sensing device 10A according to another embodiment of the present invention. Figure 12 is a schematic diagram of an image I' obtained by an optical sensing device 10A according to another embodiment of the present invention. Figure 13 FIG. 1 is a schematic diagram of a distribution curve C' generated by converting an image I' according to another embodiment of the present invention. Figure 14 FIG2 is a schematic diagram of an optical sensing device 10A and a target container 12 according to another embodiment of the present invention. The optical sensing device 10A can be used to detect the size of the target container 12. The optical sensing device 10A may include a light source 14A, an optical sensor array 16A, and a processor 20A. The optical sensing device 10A may also optionally include a memory module, the application of which is described in the previous embodiment and will not be repeated here.
[0102] The light source 14A may be a line light source that projects a long strip of illumination light onto the target container 12, or a point light source that projects a divergent illumination light onto the target container 12. The optical sensor array 16A receives detection light reflected from the target container 12, the pattern of which corresponds to the pattern of the light projected by the light source 14A.
[0103] The processor 20A can be electrically connected to the optical sensor array 16A. The processor 20A can analyze the brightness distribution of the detection light to identify two or more specific brightness regions and, based on the spacing between these specific brightness regions, determine the radial dimension of the target container 12. For example, if the light source 14A is a point light source and the target container 12 is a round cup, the image I' captured by the optical sensor device 10A will have a circular pattern. Because the rim A1 of the target container 12 is relatively close to the optical sensor device 10A, and the detection light output by the light source 14A scatters around the rim A1 of the target container 12, generating a circle of multiple reflection points P1-1 to P1-n (i.e., the aforementioned specific brightness regions) with a specific brightness, the processor 20A can analyze the relative positions of the multiple reflection points P1-1 to P1-n to determine the width W1 of the target container 12 (i.e., the aforementioned radial dimension).
[0104] If the light source 14A is a linear light source and the target container 12 is a round cup, the distribution curve formed by the image conversion obtained by the optical sensing device 10A will produce two reflection points (not shown in the figure) with specific brightness due to scattering on the left and right opposite sides of the cup mouth A1 of the target container 12. The processor 20A can analyze the distance between these two reflection points to obtain the width W1 of the target container 12 (i.e., the radial dimension mentioned above).
[0105] Please refer to Figures 12 to 14 , the image I' may have an outer circular pattern with a larger radial size and an inner circular pattern with a smaller radial size. The outer circular pattern is composed of a plurality of reflection points P1-1 to P1-n with a first brightness, which can reflect the width W1 of the target container 12 at a first height (i.e., the position of the cup mouth A1). The inner circular pattern may be composed of a plurality of reflection points P2-1 to P2-n with a second brightness. If the target container 12 is not filled with liquid, it can be determined that the detection light output by the light source 14A is scattered at the bottom A2 of the target container 12 to generate the reflection points P2-1 to P2-n; if the target container 12 contains liquid, it can be determined that the detection light output by the light source 14A is scattered at the liquid surface A3 in the target container 12 to generate the reflection points P2-1 to P2-n. The processor 20A can analyze the relative positions of the reflection points P2-1 to P2-n to obtain the width W2 of the bottom A2 or the liquid surface A3 of the target container 12.
[0106] In other words, the multiple reflection points P2-1 through P2-n reflect the width W2 of the target container 12 at a second height (e.g., at the location of the bottom A2 or the liquid level A3). The distance between the bottom A2 (or the liquid level A3) and the optical sensing device 10A is longer than the distance between the rim A1 of the target container 12 and the optical sensing device 10A. The second brightness of the reflection points P2-1 through P2-n can be higher than the brightness reflected from the wall of the target container 12, but lower than the first brightness of the reflection points P1-1 through P1-n at the rim A. Therefore, the processor 20A can analyze the inner and outer circular patterns of the image I' and / or the corresponding distribution curve C to quickly identify the location and width of the rim A1, bottom A2, and / or liquid level A3 of the target container 12.
[0107] Please refer to Figures 18 to 20. Figure 18 is a functional block diagram of an optical sensing device 10B according to another embodiment of the present invention. Figures 19 and 20 are schematic diagrams of the optical sensing device 10B detecting a target container 12 according to another embodiment of the present invention. The optical sensing device 10B may include a first line light source 30, a second line light source 32, an optical sensor array 34, and a processor 36. The first line light source 30 and the second line light source 32 may project a first elongated illumination light and a second elongated illumination light, respectively, onto the target container 12. The target container 12 and the support surface S reflect the first elongated detection light and the second elongated detection light, respectively, which are received by the optical sensor array 34. Each segment of the first elongated detection light is reflected from a plurality of blocks S1_1 to S1_n of the target container 12 and / or the support surface S. Each segment of the second elongated detection light is reflected from a plurality of blocks S2_1 to S2_n of the target container 12 and / or the support surface S.
[0108] The optical sensor array 34 can be an MxN array, with parameters M and N both being positive integers; however, practical applications are not limited thereto. A processor 36 can be electrically connected to the optical sensor array 34. The processor 36 can analyze the brightness distribution of the first and second elongated detection light strips on the target container 12 and / or the support surface S to determine the relative distance between the target container 12 and the optical sensor array 34. The first elongated detection light strip can form two intersection points Pi_1 and Pi_2 on the rim 122 of the target container 12, while the second elongated detection light strip can form two intersection points Pi_3 and Pi_4 on the rim 122 of the target container 12. The processor 36 can calculate the distance between the intersection points Pi_1 and Pi_2, and the distance between the intersection points Pi_3 and Pi_4, thereby determining the relative distance between the target container 12 and the optical sensor array 34.
[0109] As shown in FIG. 19 , the distance between intersections Pi_1 and Pi_2 is greater than the distance between intersections Pi_3 and Pi_4, and intersections Pi_3 and Pi_4 are relatively close to one of intersections Pi_1 and Pi_2, for example, closer to intersection Pi_2 but farther from intersection Pi_1. In this case, it can be determined that target container 12 is not directly under optical sensor array 34. As shown in FIG. 20 , the distance between intersections Pi_1 and Pi_2 is equal to or similar to the distance between intersections Pi_3 and Pi_4, and the virtual connecting line between intersections Pi_3 and Pi_4 is located at the center of intersections Pi_1 and Pi_2. This indicates that target container 12 is directly under optical sensor array 34. Based on the aforementioned determination results, optical sensor device 10B can further issue corresponding prompts, such as prompting whether the position of target container 12 needs to be adjusted to ensure that the machine can correctly inject liquid into target container 12 without leakage.
[0110] The optical sensing device of the present invention can determine the height and diameter of the target container by projecting images captured by a line or point light source onto the target container and the support surface. If the optical parameters of the liquid in the target container, such as refractive index, reflectivity, and absorptivity, are known, these optical parameters can be further used to compensate for the calculated liquid level. Furthermore, the optical sensing device can utilize a pressure sensor to detect changes in the weight of the liquid injected into the target container. The diameter of the target container can then be determined using the number of pixels in the optical sensor array and the height of the optical sensor array relative to the rim of the target container. The device can then analyze the increased weight and density of the injected liquid, as well as the diameter of the target container, to calculate the liquid level within the target container.
[0111] In summary, the optical sensing device can simultaneously use an optical sensor array and a pressure sensor to detect the liquid in the target container. If the optical sensing device detects that the water level of the injected liquid rises and the weight of the target container also increases, it indicates that the injected liquid may be dark or non-transparent (such as coffee). At this time, the optical sensing array can measure the correct water level of the injected liquid. If the optical sensing device does not detect the water level of the injected liquid rising, or detects that the water level of the injected liquid rises slowly or non-linearly, but the weight of the target container continues to increase, it indicates that the injected liquid may be light or transparent (such as water). At this time, a pressure sensor must be further used to assist the optical sensing array in measuring the correct water level of the injected liquid. Compared to the known technology, the optical sensing device of the present invention can be used in machines such as water dispensers, coffee machines, or soda machines. It can quickly and accurately calculate the water level of the injected liquid in the target container, effectively estimate the water output of the machine to prevent the injected liquid from overflowing the target container.
[0112] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. An optical sensing device for detecting a target container, characterized in that: The optical sensing device comprises: A line light source, used to project a long strip of illumination light onto the target container; An optical sensor array, comprising a plurality of sensor units arranged in a long strip shape, for receiving the long strip detection light generated by the reflection of the target container; wherein the optical sensor array is used to be placed above the target container; and a processor electrically connected to the optical sensor array, the processor analyzing the brightness distribution of the long strip detection light received by the plurality of sensor units to obtain a relative distance between the optical sensor array and the rim of the target container; The processor further identifies the rim and base of the target container and calculates the rim's diameter using the relative distance between the optical sensor array and the rim. A perpendicular projection point of the optical sensor array relative to the plane on which the rim lies is considered an alignment point. The processor analyzes the viewing angle of the optical sensor array to obtain a field of view distance between the alignment point and a boundary of the viewing angle, and uses the field of view distance to calculate a rim distance between the rim and the alignment point to obtain the diameter accordingly.
2. The optical sensing device according to claim 1, wherein: The long strip of detection light is divided into multiple segments, which are respectively reflected from multiple blocks of the target container and received by the multiple sensor units. The processor further analyzes the brightness of the multiple segments to calculate the distance change of the optical sensor array relative to the multiple segments to obtain the outlines of the multiple blocks.
3. The optical sensing device according to claim 2, wherein: The processor further analyzes the contours of the plurality of blocks to obtain depth variation information within the cup rim, and determines whether the liquid in the target container has any extra objects according to the depth variation information.
4. The optical sensing device according to claim 2, wherein: The distance variation is a combination of multiple relative distances between each block and a corresponding sensing unit.
5. The optical sensing device according to claim 2, wherein: The processor divides the brightness distribution into a first area having a maximum brightness calculation value and a second area having a minimum brightness calculation value, and analyzes the first area and the second area to determine the height of the target container using the height difference between the cup rim and the carrying surface where the target container is located.
6. The optical sensing device according to claim 5, wherein: The processor divides the brightness distribution into the first region, the second region, and a third region, wherein the third region has a brightness calculation value between the maximum brightness calculation value and the minimum brightness calculation value. The processor further analyzes the third region to determine the remaining capacity of the target container using a height difference between the cup rim and the base of the target container.
7. The optical sensing device according to claim 2, wherein: The processor further analyzes the brightness difference between the multiple segments, finds out the segment with abnormal optical parameters and regards it as the base of the target container, so as to use the segment with abnormal optical parameters to determine the remaining capacity of the target container.
8. The optical sensing device according to claim 1, wherein: The optical sensing device further includes a memory module electrically connected to the processor for storing optical parameters of multiple liquids. The processor further calculates the relative distance between the optical sensing array and the liquid in the target container by analyzing and compensating the brightness distribution and the optical parameters.
9. The optical sensing device according to claim 8, wherein: The processor further analyzes the image generated by the brightness distribution conversion, and uses the geometric center information of the image to determine the numerical range of the optical parameter, thereby confirming the type of the liquid.
10. The optical sensing device according to claim 8, wherein: The optical parameter is one or more of reflectivity, refractive index and absorptivity.
11. The optical sensing device according to claim 8, wherein: The cup opening of the target container is surrounded by the cup edge and points to the optical sensor array. The liquid is contained in the target container and is exposed to the outside through the cup opening.
12. The optical sensing device according to claim 1, wherein: The optical sensing device further includes a pressure sensor electrically connected to the processor for detecting the weight of the target container.
13. The optical sensing device according to claim 12, wherein: The processor analyzes the caliber, density and weight of the liquid in the target container to obtain the water level of the liquid.
14. The optical sensing device according to claim 13, wherein: When the weight increases and the water level of the liquid in the target container increases, the processor uses the detection results of the optical sensor array as the water level of the liquid. When the weight increases but the water level of the liquid does not increase, the processor uses the detection results of the pressure sensor and the optical sensor array as the water level of the liquid.
15. The optical sensing device according to claim 1, wherein: The line light source includes a long strip light emitting unit for outputting the long strip lighting light.
16. The optical sensing device according to claim 1, wherein: The line light source includes a plurality of adjacently arranged light emitting units for outputting the long strip lighting light.
17. The optical sensing device according to claim 1, wherein: The optical sensor array is an Mx1 array, where M is a positive integer, or an MxN array, where both M and N are positive integers.
18. The optical sensing device according to claim 1, wherein: The optical sensing device further includes a rotation motor for supporting and rotating the line light source or the target container so that the line light source can scan the target container.
19. The optical sensing device according to claim 1, wherein: The optical sensing device further includes a moving motor for supporting and moving the line light source or the target container so that the line light source can scan the target container.
Citation Information
Patent Citations
Intelligent water injection device and method
CN109717749A
Detection device
CN111712685A
Container sealing surface inspection
US6903814B1