Method for measuring water quantity by means of light-sensitive sensor and cup
Patent Information
- Application Number
- CN202510789844.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2045-06-13
AI Technical Summary
传统称重传感器方案一般通过底部压力传感器测量重量变化来计算水量,需定期校准,且无法区分倒水与放置晃动
[0029]易于实现,成本低,仅通过光源和光敏传感器即可测量杯内水量,元器件成本低;计算简单、准确,通过光照强度直接换算水位,计算量低;抗干扰好,杯内水汽对光敏传感器测量光照强度干扰低。
Smart Images

Figure CN120593863B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart water cup technology, and in particular to a method and cup for measuring water volume using a photosensitive sensor. Background Technology
[0002] Currently, smart water bottles have been widely developed and offer a variety of functions, one important of which is the ability to measure the remaining water volume. Existing methods for measuring the remaining water volume generally include traditional weighing sensor solutions and pure tilt angle detection solutions. Traditional weighing sensor solutions typically calculate water volume by measuring weight changes using a bottom pressure sensor; this requires regular calibration and cannot distinguish between pouring and shaking. Pure tilt angle detection solutions generally use a six-axis sensor to calculate the geometric relationship between the tilt angle and water volume, but this is easily affected by irregular container shapes and liquid sloshing, the calculations are complex, and it lacks accurate judgment of pouring actions.
[0003] Therefore, there is a need for a simple, accurate, easy-to-implement, and low-cost technical solution for measuring the remaining water volume in a water cup. Summary of the Invention
[0004] To solve the above-mentioned technical problems, the present invention provides a method for measuring water volume using a photosensitive sensor and a cup.
[0005] This invention provides a method for measuring water volume using a photosensitive sensor, applicable to a cup. The cup lid is equipped with a light source and a photosensitive sensor, and includes the following specific steps:
[0006] Based on the parameters of the cup, a water volume and light intensity table is constructed;
[0007] With the light source turned off, the light intensity inside the cup is periodically measured by a photosensitive sensor to obtain the first light intensity.
[0008] Determine whether the cup is in a closed state based on the first light intensity;
[0009] When the cup is in the closed position, the light source is turned on, and the initial light intensity inside the cup is obtained through the photosensitive sensor to obtain the second light intensity.
[0010] The cup is determined to be in a stable state based on the second light intensity.
[0011] When the cup is in a stable state, the amount of water in the cup is calculated based on the second light intensity and the water volume light intensity table.
[0012] In one possible implementation, when calculating the water volume in the cup based on the second light intensity and the water volume light intensity table, the specific steps are as follows:
[0013] Based on the water volume and light intensity table, the second light intensity is fitted with a cubic polynomial to calculate the water volume in the cup.
[0014] In one possible implementation, when calculating the water volume in the cup based on the second light intensity and the water volume light intensity table, the specific steps are as follows:
[0015] Based on the water volume and light intensity table, the second light intensity is proportionally fitted to calculate the water volume in the cup.
[0016] In one possible implementation, the formula for calculating water volume during proportional fitting is:
[0017]
[0018] Among them, E n-1 ≤E≤E n E is the second light intensity. n and E n-1 V represents the two adjacent light intensity values in the water quantity and light intensity table that are closest to E. n and V n-1 These are E in the water quantity and light intensity table. n and E n-1 The corresponding amount of water.
[0019] In one possible implementation, a triaxial accelerometer is installed inside the cup lid. Before periodically acquiring the light intensity inside the cup, the triaxial acceleration fluctuation value is first acquired through the triaxial accelerometer. If the triaxial acceleration fluctuation value is less than the fluctuation threshold, the light intensity inside the cup is acquired periodically.
[0020] In one possible implementation, a temperature sensor is also provided on the cup lid. When the initial light intensity inside the cup is obtained, the real-time temperature is also obtained through the temperature sensor.
[0021] The initial light intensity is calibrated based on the real-time temperature to obtain the second light intensity.
[0022] In one possible implementation, the calibration formula used during calibration is:
[0023] E = E0 + aT + b;
[0024] Where E0 is the initial light intensity, T is the real-time temperature, a is the temperature coefficient, and b is the offset.
[0025] The present invention also provides a cup, the lid of which is provided with a light source and a photosensitive sensor, and the cup is capable of performing the method described above.
[0026] In one possible implementation, a triaxial accelerometer is provided inside the cup lid.
[0027] In one possible implementation, a temperature sensor is also provided on the cup lid.
[0028] The technical solution provided by this invention has at least the following beneficial effects:
[0029] It is easy to implement and low in cost, measuring the water level in a cup using only a light source and a photosensitive sensor, resulting in low component costs; the calculation is simple and accurate, directly converting the water level into light intensity, with low computational load; it has good anti-interference capabilities, with low interference from water vapor in the cup on the photosensitive sensor's measurement of light intensity. Attached Figure Description
[0030] Figure 1 A flowchart of a method for measuring water volume using a photosensitive sensor provided in an embodiment of the present invention;
[0031] Figure 2 This is a cross-sectional view of the cup lid and cup body in a scenario provided by an embodiment of the present invention.
[0032] Figure 3 A perspective view of a cup lid provided in an embodiment of the present invention;
[0033] Figure 4 This is a schematic diagram of the peripheral structure of the microcontroller unit provided in an embodiment of the present invention;
[0034] Figure 5 This is a state flowchart of a method for measuring water volume using a photosensitive sensor provided in an embodiment of the present invention;
[0035] In the attached diagram, 10 is the cup lid; 11 is the lid body; 12 is the lid core; 13 is the photosensitive sensor; 14 is the light source; 15 is the circuit board; 16 is the temperature sensor; and 20 is the cup body. Detailed Implementation
[0036] To enhance understanding of the present invention, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. These embodiments are only used to explain the invention and do not limit the scope of protection of the invention.
[0037] Please refer to Figures 1 to 5 This invention provides a method for measuring water volume using a photosensitive sensor, applied to a cup. The cup includes a lid 10 and a cup body 20. The lid 10 includes a lid body 11 and a lid core 12. The top of the lid core 12 is located in the central region of the inner bottom surface of the lid body 11, and a photosensitive sensor 13 and a light source 14 are disposed on its bottom surface. A circuit board 15 is disposed inside the core 12. The photosensitive sensor 13 and the light source 14 are electrically connected to a microcontroller unit (MCU) on the circuit board 15. The light emission direction of the light source 14 is towards the water-containing area of the cup body 20.
[0038] The method for measuring water volume using a photosensitive sensor includes the following specific steps:
[0039] S100: Based on the parameters of the cup, construct a water volume and light intensity table.
[0040] In this embodiment, the photosensitive sensor 13 can be a conventional model, such as a photoresistor or photodiode. The light source 14 uses a conventional light source, such as a low-power LED. The microcontroller unit on the circuit board 15 uses a conventional wireless communication MCU, which can transmit data information to other wireless devices. The MCU can control the light source 14 to turn on or off, and can obtain the light intensity of the current environment through the photosensitive sensor 13, and perform a series of data processing tasks. The parameters of the cup include the type of photosensitive sensor 13, the light source 14, the internal structure and material of the cup body 20, etc. This application provides a method for calculating the water volume in a cup by detecting the light intensity inside the cup using the photosensitive sensor 13 and the light source 14. The calculation method is simple, the measurement is accurate, it is easy to implement, and the cost is low.
[0041] The water volume and light intensity table consists of two parts: water volume and light intensity. A specific embodiment is shown in Table 1 below.
[0042] Table 1:
[0043] 0 1470 10 1473 50 1503 100 1560 150 1620 200 1686 250 1738 300 1796 350 1832
[0044] It should be noted that the data in Table 1 are from experimental data. The values in the water volume and light intensity table will differ depending on the type of photosensitive sensor 13, the light source 14 used, and the internal structure and material of the cup 20. The rated capacity of the cup 20 used in the experiment in Table 1 is 350 mL; therefore, only the light intensity values corresponding to different water volumes within the range of 0–350 mL were tested. The water volume and light intensity table can be adjusted according to the actual capacity of the cup used. For ease of calculation, the light intensity values in the table can be directly obtained from the original AD analog-to-digital converter (AD converter) or converted to light intensity values in other units.
[0045] S200: Turn off the light source 14, and obtain the light intensity inside the cup at regular intervals through the photosensitive sensor 13 to obtain the first light intensity.
[0046] In one possible implementation, a triaxial accelerometer is installed inside the cup lid 10. Before periodically acquiring the light intensity inside the cup, the triaxial acceleration fluctuation value is first acquired through the triaxial accelerometer. If the triaxial acceleration fluctuation value is less than the fluctuation threshold, the light intensity inside the cup is acquired periodically.
[0047] In this embodiment, the first light intensity can be understood as the light intensity at the current stage. To improve measurement accuracy, a triaxial accelerometer can be added, which is electrically connected to the MCU on the circuit board 15. After adding the triaxial accelerometer, it is possible to determine whether the cup body 20 is in a stable state based on the acceleration values in the three axes. When the cup body 20 is in a stable state, the light intensity is obtained when the light source 14 is off, thus obtaining the first light intensity.
[0048] S300: Determine whether the cup is in a closed state based on the first light intensity.
[0049] In this embodiment, the method for determining whether the device is in a closed state is: the triaxial acceleration value fluctuates little (e.g., the peak-to-peak value over a period of time, i.e., the triaxial acceleration fluctuation value Δ ≤ 0.05 m / s). 2 (The light source 14 is turned off, and the current light intensity value is 0. No light is detected inside the cup, indicating that the cup is in a closed state. The fluctuation threshold is 0.05m / s.) 2 .
[0050] S400: When the cup is in the closed state, turn on the light source 14, and obtain the initial light intensity inside the cup through the photosensitive sensor 13 to obtain the second light intensity.
[0051] In one possible implementation, a temperature sensor 16 is also provided on the cup lid 10. When the initial light intensity inside the cup is obtained, the real-time temperature is also obtained through the temperature sensor 16.
[0052] The initial light intensity is calibrated based on the real-time temperature to obtain the second light intensity.
[0053] In this embodiment, the second light intensity can be understood as the light intensity at the current stage. The temperature sensor 16 can be disposed on the bottom surface of the lid core 12 in the cup lid 10 and can be implemented based on a thermistor. Temperature-based data calibration can improve measurement accuracy. The temperature sensor 16 is electrically connected to the MCU on the circuit board 15. The temperature sensor 16 can be implemented based on a thermistor. By acquiring the current ambient temperature data, the MCU can calibrate the light intensity, thereby reducing the influence of moisture on the photosensor 13.
[0054] In one possible implementation, the calibration formula used during calibration is:
[0055] E = E0 + aT + b;
[0056] Where E0 is the initial light intensity, T is the real-time temperature, a is the temperature coefficient, and b is the offset. Both a and b are obtained through testing.
[0057] S500: Determine whether the cup is in a stable state based on the second light intensity.
[0058] In this embodiment, the method for determining a stable state is as follows: Light source 14 is turned on, and the current light intensity value is obtained. Small fluctuations in light intensity indicate a stable state. To improve accuracy, the stability of the cup 20 can be further determined by combining the triaxial acceleration values from a triaxial accelerometer. For example, small fluctuations in the triaxial acceleration values (e.g., peak-to-peak value Δ ≤ 0.05 m / s² over a period of time). 2 Turn on light source 14, obtain the current light intensity value, and determine that the light intensity fluctuation is small as a stable state.
[0059] S600: When the cup is in a stable state, calculate the amount of water in the cup based on the second light intensity and the water volume light intensity table.
[0060] In this embodiment, a display module can be provided on the outer top surface of the lid body 11. The display module is electrically connected to the microcontroller unit on the circuit board 15. The display module can be used to display the calculated water volume contained in the cup body 20. The display module can adopt a conventional design. Since the light intensity varies with the water volume, the larger the water volume and the higher the liquid level, the higher the light intensity. Accordingly, the water volume in the cup can be calculated based on the water volume and light intensity table (as shown in Table 1).
[0061] In one possible implementation, when calculating the water volume in the cup based on the second light intensity and the water volume light intensity table, the specific steps are as follows:
[0062] Based on the water volume and light intensity table, the second light intensity is fitted with a cubic polynomial to calculate the water volume in the cup.
[0063] In this embodiment, the water volume calculation method is as follows: Based on the water volume and light intensity table, a cubic polynomial fitting is performed on the light intensity to obtain the current light intensity E, i.e., the second light intensity. The formula for calculating the current water volume in the cup is:
[0064] V = -7.499 × 10 -6 ×E 3 +3.897×E 2 +0.595×E+1467.717
[0065] Where E is the currently measured light intensity (AD sampling value), and the goodness of fit R of the fitted cubic polynomial is calculated. 2 =0.9996, indicating a very good fit, almost perfectly describing the changing trends of water volume and light intensity. This also demonstrates that the method of measuring water volume through light intensity is very effective.
[0066] In one possible implementation, when calculating the water volume in the cup based on the second light intensity and the water volume light intensity table, the specific steps are as follows:
[0067] Based on the water volume and light intensity table, the second light intensity is proportionally fitted to calculate the water volume in the cup.
[0068] In one possible implementation, the formula for calculating water volume during proportional fitting is:
[0069]
[0070] Among them, E n-1 ≤E≤E n E is the second light intensity. n and E n-1 V represents the two adjacent light intensity values in the water quantity and light intensity table that are closest to E. n and V n-1 These are E in the water quantity and light intensity table. n and E n-1 The corresponding amount of water.
[0071] In this embodiment, if the MCU's computing power is limited, a proportional fitting method can be used to calculate the water volume in the cup to reduce the computational load. The second light intensity E is equivalent to the current light intensity.
[0072] The present invention also provides a cup, wherein a light source 14 and a photosensitive sensor 13 are provided on the lid 10 of the cup, and the cup is capable of performing the method described above.
[0073] In one possible implementation, a triaxial accelerometer is provided inside the cup lid 10.
[0074] In one possible implementation, a temperature sensor 16 is also provided on the cup lid 10.
[0075] refer to Figure 5 The specific water volume measurement process of this application is as follows: the light intensity inside the cup is acquired at regular intervals, and the cup is judged to be in a closed state based on the acquired light intensity. In the closed state, the light source 14 inside the cup is turned on, and the light intensity inside the cup is acquired again. If the light intensity is in a stable state, it means that the cup body 20 is in a stable state. The water volume inside the cup is calculated based on the light intensity inside the cup at this time.
[0076] The above embodiments should not limit the present invention in any way. All technical solutions obtained by equivalent substitution or equivalent conversion fall within the protection scope of the present invention.
Claims
1. A method for measuring water volume using a photosensitive sensor, applied to a cup, wherein a light source, a photosensitive sensor, and a temperature sensor are disposed on the cup lid, and a triaxial accelerometer is disposed inside the cup lid, characterized in that, The specific steps include the following: Based on the parameters of the cup, a water volume and light intensity table is constructed; Before periodically acquiring the light intensity inside the cup, the triaxial acceleration fluctuation value is acquired through the triaxial accelerometer. If the triaxial acceleration fluctuation value is less than the fluctuation threshold, the light source is turned off, and the light intensity inside the cup is acquired periodically through the photosensitive sensor to obtain the first light intensity. Determine whether the cup is in a closed state based on the first light intensity; When the cup is in the closed position, the light source is turned on, the initial light intensity inside the cup is obtained through the photosensitive sensor, and the real-time temperature is obtained through the temperature sensor at the same time. The initial light intensity is calibrated based on the real-time temperature to obtain the second light intensity. The calibration formula used during calibration is as follows: E = E0 + aT + b; Where E0 is the initial light intensity, T is the real-time temperature, a is the temperature coefficient, and b is the offset; Determine whether the cup is in a stable state based on the second light intensity; When the cup is in a stable state, the amount of water in the cup is calculated based on the second light intensity and the water volume light intensity table.
2. The method according to claim 1, characterized in that, When calculating the water volume in the cup based on the second light intensity and the water volume light intensity table, the specific steps are as follows: Based on the water volume and light intensity table, the second light intensity is fitted with a cubic polynomial to calculate the water volume in the cup.
3. The method according to claim 1, characterized in that, When calculating the water volume in the cup based on the second light intensity and the water volume light intensity table, the specific steps are as follows: Based on the water volume and light intensity table, the second light intensity is proportionally fitted to calculate the water volume in the cup.
4. The method according to claim 3, characterized in that, The formula for calculating water volume during proportional fitting is: ; Among them, E n-1 ≤E≤E n E is the second light intensity. n and E n-1 V represents the two adjacent light intensity values in the water quantity and light intensity table that are closest to E. n and V n-1 These are E in the water quantity and light intensity table. n and E n-1 The corresponding amount of water.
5. A cup, characterized in that, The cup lid is equipped with a light source, a photosensor, and a temperature sensor, and a triaxial accelerometer is installed inside the cup lid. The cup is capable of performing the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Intelligent water cup and method and system for detecting water intake of intelligent water cup
CN104643829A
Method for measuring liquid level in container based on DTOF, DTOF module and container
CN116295717A
Cup cover with water level detection function and water cup
CN221129520U
Cup cover and water cup
CN224155434U