Non-contact water level detection management method and electronic equipment thereof

By using a non-contact water level detection method, a reference value of water capacitance is obtained and periodically compared with the real-time detection value. This solves the problem of relying on potting structure and manual adjustment in the existing technology, and realizes low-cost and high-stability water level detection and water pump control.

CN120927095APending Publication Date: 2025-11-11SHENZHEN BEIBANQIU NETWORK TECHNOLOGY CO LT
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510900489.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing methods for detecting water levels in pet drinking water devices rely on a potting compound structure, which results in high manufacturing costs, inconvenient maintenance, and susceptibility to capacitor drift and environmental changes, leading to frequent pump start-stop cycles, reduced system stability, and shorter lifespan.

Method used

A non-contact water level detection method is adopted. By obtaining the reference value of the water capacitance of the target pet drinking device in a waterless state, the real-time detection value is collected periodically, and the water level status is determined based on comparison and processing, thereby controlling the water pump operation status and avoiding reliance on glue-filling structure and manual adjustment.

Benefits of technology

It achieves highly stable and low-cost water level detection, accurately distinguishes between water-containing and water-free states, avoids accidental triggering of water pumps, and improves the service life and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120927095A_ABST
    Figure CN120927095A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a non-contact water level detection management method and device. The non-contact water level detection management method comprises the following steps: acquiring a water capacitance reference value of target pet drinking equipment in a water-free state; when the target pet water drinking equipment is in a normal operation process, periodically collecting a water capacitance real-time detection value of the target pet water drinking equipment through presetting; performing comparison processing on the basis of the water capacitance reference value and the water capacitance real-time detection value, and determining the current water level state in the target pet drinking equipment; and based on the water level state, performing control management on the water pump operation state of the target pet water drinking equipment. By taking the no-load calibration value as the reference datum and combining with periodic detection, the water state and the water-free state can be accurately distinguished, the water judgment precision is improved, the water pump is effectively prevented from being mistakenly triggered to operate, and the device has the advantages of being simple in structure, low in cost and high in applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent detection, and in particular to a non-contact water level detection and management method, device, electronic device and its storage medium. Background Technology

[0002] Currently, pet drinking fountains generally use electrode-based or capacitive water level detection methods to achieve automatic water supply and pump control. However, existing technologies generally have the following problems: On the one hand, capacitive detection structures typically require potting sealant between the sensor and the plastic water tank to ensure the stability of the sensor's readings. However, this potting process not only increases manufacturing costs and production time but also causes inconvenience for later maintenance. On the other hand, most existing water level detection solutions rely on fixed thresholds or analog comparators to directly determine whether the capacitance value meets the water level standard. This is easily affected by factors such as capacitance drift and environmental changes, leading to misjudgments and causing frequent pump start-ups and shutdowns, thus reducing system stability and lifespan.

[0003] In addition, while some solutions support capacitance calibration, they usually rely on manual adjustment of potentiometers or manual configuration of parameters, making it difficult to adapt to the needs of large-scale automated production and lacking integrated embedded control capabilities.

[0004] Therefore, there is a need for a non-contact water level detection and management method that does not rely on a potting structure, can automatically collect reference values ​​and perform dynamic comparison processing, and achieves high stability, low cost, and intelligent water pump control, in order to overcome the above-mentioned defects in the existing technology. Summary of the Invention

[0005] This invention provides a non-contact water level detection and management method to solve the problem that existing non-contact water level detection and management methods rely on a glue-filling structure and cannot automatically collect reference values ​​and perform dynamic comparison processing to detect the water level status of equipment and manage the water level.

[0006] In a first aspect, embodiments of the present invention provide a non-contact water level detection and management method, the method comprising the following steps: Obtain the reference value of the water capacitance of the target pet water device in a waterless state; When the target pet drinking device is operating normally, the water capacitance value of the target pet drinking device is collected in real time through a preset periodic method. Based on the comparison between the water capacitance reference value and the real-time water capacitance detection value, the current water level status in the target pet drinking device is determined. Based on the water level status, the operation status of the water pump of the target pet drinking water device is controlled and managed.

[0007] Optionally, obtaining the reference value of the water capacitance of the target pet drinking device in a waterless state includes: Before the target pet watering device is powered on for the first time, the preset test contact is grounded and the water capacitance value of the target pet watering device in the current waterless state is collected. The water capacitance value of the current target pet drinking device in a waterless state is stored as the water capacitance reference value.

[0008] Optionally, before periodically collecting the real-time water capacitance value of the target pet drinking device during normal operation, the method further includes: Based on the detection interval data of the target pet drinking device, the current first preset cycle is determined; Determine the vibration state of the water capacitor in the target pet drinking device, wherein the vibration state is used to confirm the contact frequency between the water capacitor and the water level; Based on the jitter state, determine the preset periodic adjustment data; Based on the adjustment data, the current first preset period is adjusted to obtain a second preset period; According to the second preset period, the real-time detection value of the water capacitance of the target pet drinking device is collected.

[0009] Optionally, when the target pet drinking device is operating normally, the step of periodically collecting the real-time detection value of the water capacitance of the target pet drinking device includes: When the target pet drinking device is detected to be operating normally, the water capacitance value is collected in real time according to the preset periodic time interval, and the collected real-time water capacitance value is cached.

[0010] Optionally, the water level status includes a water-containing state and a water-free state. The step of comparing the water capacitance reference value and the real-time water capacitance detection value to determine the current water level status in the target pet drinking device includes: The difference between the real-time detection value of water capacitance and the reference value of water capacitance within multiple preset periods is calculated to obtain multiple water capacitance differences. When the difference between water capacitance and water capacitance is greater than or equal to the reference value of water capacitance within a consecutive preset number of cycles, the target pet drinking device is determined to be in a water-containing state. If the difference in water capacitance is less than the reference value of water capacitance within a consecutive preset number of cycles, then the target pet drinking device is determined to be in a waterless state.

[0011] Optionally, the method for determining the current water level in the target pet drinking device by comparing the water capacitance reference value and the real-time water capacitance detection value further includes: Determine the current environmental data of the water capacitor, including temperature data and humidity data; Based on the temperature and humidity data, error adjustment data for the real-time detection value of the water capacitor is determined; The real-time detection value of the water capacitor is adjusted based on the error adjustment data to obtain the target real-time detection value of the water capacitor. The water level status in the target pet drinking device is obtained by comparing the real-time detection value of the target water capacitance with the reference value of the water capacitance.

[0012] Optionally, the step of controlling and managing the water pump operation status of the target pet drinking device based on the water level status includes: When the water level remains at a zero level for multiple consecutive sampling cycles, the water pump is controlled to start operation. When the water level remains in a water-containing state for multiple consecutive sampling cycles, the water pump is controlled to stop operating.

[0013] Secondly, embodiments of the present invention also provide a non-contact water level detection and management device, the non-contact water level detection and management device comprising: The first acquisition module is used to acquire the reference value of the water capacitance of the target pet drinking device in a waterless state; The first acquisition module is used to acquire the real-time detection value of the water capacitance of the target pet drinking device through a preset periodicity when the target pet drinking device is operating normally. The first determining module is used to compare the water capacitance reference value and the real-time detection value of the water capacitance to determine the current water level status in the target pet drinking device. The first control module is used to control and manage the operation status of the water pump of the target pet drinking device based on the water level status.

[0014] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the non-contact water level detection and management method provided in embodiments of the present invention.

[0015] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the non-contact water level detection and management method provided in the embodiments of the present invention.

[0016] In this embodiment of the invention, a reference value of the water capacitance of the target pet drinking device in a waterless state is obtained; when the target pet drinking device is operating normally, the real-time detection value of the water capacitance of the target pet drinking device is collected periodically according to a preset schedule; based on the comparison processing of the water capacitance reference value and the real-time detection value, the current water level status in the target pet drinking device is determined; based on the water level status, the operating status of the water pump of the target pet drinking device is controlled and managed. By using the no-load calibration value as a reference benchmark and combining it with periodic detection, the presence and absence of water can be accurately distinguished, improving the accuracy of water judgment, effectively avoiding false triggering of water pump operation, and has the advantages of simple structure, low cost, and strong applicability. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of a non-contact water level detection and management method provided in an embodiment of the present invention; Figure 2 This is a circuit diagram of a non-contact water level monitoring circuit provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of another non-contact water level detection and management device provided in this embodiment of the invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] like Figure 1 As shown, Figure 1 This is a flowchart of a non-contact water level detection and management method provided by an embodiment of the present invention. The non-contact water level detection and management method includes the following steps: 101. Obtain the reference value of the water capacitance of the target pet drinking device in a waterless state.

[0021] In this embodiment of the invention, the above-mentioned non-contact water level detection and management method can be applied to a non-contact water level detection and management platform. The above-mentioned non-contact water level detection and management system has functions such as water level data processing, water level data transmission and reception, and water level data memory storage. It can be built based on a server or server cluster. The server or server cluster can be an electronic device with water level data processing capability, such as a pet drinking water device with water level detection function, including pumping type and self-filling type drinking water device.

[0022] The aforementioned target pet drinking device can be the object of this invention, specifically a household pet water fountain or an automatic water dispensing device. This device or apparatus includes at least a non-contact water level detection circuit, which can, as shown in the example... Figure 2 The circuit diagram shown is used for illustration. The diagram includes ①-U1 water detection control chip, ②-U2 water pump motor drive chip, ③-EC1 water detection capacitor, ④-C4 adjusting water detection sensitivity, ⑤-C2, C3, C5 filter capacitors, ⑥-R3, R4, R6, R2 current limiting resistors, ⑦-MOT motor coil, and ⑧-T8 calibration test point.

[0023] More specifically, the above-mentioned water capacitance reference value can be obtained through the above circuit. For example, after the target pet drinking device is assembled, do not put it in water. Before powering on, ground T8 through the production fixture, and then power on. At this time, the U1 program enters the calibration mode and writes the calibrated value into the content EEPROM. Afterwards, disconnect T8, and the target pet drinking device enters the normal working mode. In the production end, T8 is grounded, calibrated and written into the EEPROM in one go, and ΔC determines the water level, which can save the glue pouring process and provide long-term moisture protection.

[0024] The above Figure 2 The circuit diagram shows that the positive terminal of electrode EC1 is connected to the power supply and then connected to the microcontroller pins (RA1 / KEY1 / PWMAO) through a current-limiting resistor (such as R2). When the water level rises to cover the electrode, the water forms a conductive path, and a microcurrent flows into the microcontroller's I0 port (limited by R2). If the water does not contact the electrode, the I0 port is in a high-resistance state and is read as a logic high level (no water); otherwise, it is read as a low level (water present). This achieves low cost and eliminates the need for a dedicated water level sensor, realizing the purpose of on / off detection using the conductivity of water.

[0025] In the motor drive control section Figure 2U2 can be a logic control module. The control signal comes from the microcontroller U1. The DO or DOB pin outputs a control signal to drive the gate (G) of Q2. Through the current-limiting resistor R4, Q2 is an N-channel power MOSFET (such as IRF540). The source (S) is grounded, and the drain (D) is connected to the motor and the power supply. One end of the motor is connected to VCC, and the other end is connected to the drain of the MOSFET. When the MOSFET is turned on, a circuit is formed, and the motor runs. Q2 has a reverse diode to prevent the induced voltage from impacting the MOSFET when the motor is turned off.

[0026] The specific circuit control logic can be as follows: after the electrode EC1 detects that the water level has reached the set value, the microcontroller reads that the I0 port is low, the microcontroller sends a control signal, controls the MOSFET Q2 to turn on through U2, the motor (MOT) starts, and performs operations such as draining / filling water. After the water level changes, the state of EC1 changes, and the microcontroller then controls the motor to turn off.

[0027] The aforementioned waterless state can refer to the state where the detection area of ​​the target pet drinking device is not covered by water or the detection electrodes are not in contact with liquid before calibration or testing. This state can represent the empty environment of the corresponding sensor in "air medium".

[0028] The aforementioned water capacitance reference value can be the capacitance data collected by the target pet drinking device in a "waterless state," representing the "no-load capacitance characteristic" of the device's sensor under the current structural assembly conditions. Specifically, the water capacitance reference value can be detected by the control chip and written into the internal memory (such as EEPROM) as a comparison benchmark value for subsequent judgment of the real-time water level status. For example, after the target pet drinking device enters the production calibration mode, the control chip triggers the detection capacitance module to collect the current EC1 electrode capacitance value (assuming it is 30.2 pF) and writes this value into the EEPROM. During subsequent operation, if the real-time collected value rises to 45.8 pF, it is judged as a "water-containing state"; otherwise, the "waterless" judgment is maintained.

[0029] In one possible embodiment, before the target pet drinking device is initially powered on, the control chip is triggered to enter calibration mode by grounding a preset test contact (such as production test pin T8). The chip controls the capacitance acquisition module to sample the sensor capacitance value in the current waterless state and stores this value in EEPROM as a reference for subsequent water level determination. After completing this calibration process, the device disconnects the test contact, automatically exits calibration mode, and enters normal operation. During subsequent use, the control chip will periodically collect real-time water capacitance values ​​and compare them with the aforementioned reference value to determine whether water is present, thereby achieving precise control of the water pump's start and stop.

[0030] 102. When the target pet drinking water device is operating normally, the water capacitance value of the target pet drinking water device is collected in real time through preset periodic sampling.

[0031] In this embodiment of the invention, the above-mentioned normal operation process can refer to the stable working stage after the target pet drinking device is actually put into use by the user in a non-testing and non-calibration state, where the device is continuously powered on, the sensors are enabled, and the control chip executes the water level detection and water pump control program. This is generally the working state after the first power-on after leaving the factory.

[0032] The aforementioned preset periodicity can be a fixed time interval parameter configured by the control chip. This parameter is used to periodically schedule the execution of water capacitance detection tasks, ensuring the continuity and real-time performance of water level detection. Typically, this is achieved by setting a sampling period interrupt through an internal MCU timer (such as Timer0), or by using a software timer under an RTOS to complete the periodic scheduling. The period value can be hard-coded into the program or configured as an adjustable parameter in the EEPROM. For example, Timer1 can be set to 1000ms, causing the control chip to trigger a capacitance detection action every second, thereby achieving 1Hz frequency timing detection and ensuring a water level status update is completed within one second.

[0033] In one possible embodiment, the capacitance value of the detection electrode (such as EC1) can be obtained in real time through a capacitance detection module or analog front-end circuit. Generally, a single acquisition includes steps such as electrode activation, signal stabilization, reading the conversion result, and temporary storage in a variable or register. The acquisition time is typically between tens of microseconds and milliseconds. It is understood that the control chip triggers an acquisition process once per second, performing a capacitance sample on the C_pad of the detection electrode. If the sampled value is 46.8 pF, it is then stored in RAM for comparison with a reference value.

[0034] The aforementioned real-time water capacitance detection value can be the capacitance value collected by the capacitance sensor of the target pet drinking device at a specific point in time, reflecting the dielectric environment state of the sensing area at that moment, and can be used to determine the water level. It is understandable that the real-time water capacitance detection value will fluctuate with external factors such as liquid level, water quality changes, temperature, humidity, and even the proximity of a finger. Therefore, an error value can be determined by combining a reference value with an anti-shake mechanism. For example, if the reference value is 30.5pF and the current real-time collected value is 47.0pF, the difference is 16.5pF, exceeding the set threshold of 10pF, then the current state is determined to be "water present".

[0035] In another possible embodiment, after the target pet drinking device completes its initial power-on and water capacitance reference value calibration, it enters the normal operation process. In this normal operation state, the control chip (e.g., MCU) triggers the detection task according to the preset periodic timing set in the program. When each cycle arrives, the control chip will sample the capacitance signal of the detection electrode (EC1) once through the internal sampling pin or capacitance detection channel to obtain the real-time detection value of the water capacitance.

[0036] 103. Based on the comparison between the reference value of water capacitance and the real-time detection value of water capacitance, determine the water level status in the current target pet drinking water device.

[0037] In this embodiment of the invention, the control chip can calculate the difference between the currently collected real-time water capacitance detection value and the water capacitance reference value saved during initialization, and compare the difference with a preset threshold to determine whether the current water level has changed, thereby achieving the purpose of comparison processing.

[0038] Specifically, upon initial power-on, calibration is triggered via a test pin, and the capacitance value of the device in a waterless state (e.g., 31.2pF) is collected and stored in the EEPROM as a reference value for water capacitance. Subsequently, during normal operation, the real-time capacitance value (e.g., 46.5pF) is collected every second. The difference ΔC = real-time value - reference value = 15.3pF is calculated and compared with a set threshold (e.g., 10pF). If ΔC ≥ threshold, it is determined that there is water; if ΔC < threshold, it is determined that there is no water.

[0039] The aforementioned control chip can be, for example, Figure 2 The circuit diagram shown is a control circuit that combines the U1 microcontroller and / or the U2 microcontroller.

[0040] The water level status mentioned above can be a binary judgment result based on the comparison processing, indicating whether there is liquid (water) in the current target pet drinking device, usually "water present" or "water absent".

[0041] In one possible embodiment, during normal operation of the device, real-time water capacitance values ​​are periodically collected, and the presence of water is determined by comparison. In this embodiment, a difference calculation method can be used, with ΔC as the difference value, wherein: The real-time detection value of the water capacitance is the current capacitance value obtained from sampling in each cycle. The reference value for water capacitance is the no-load capacitance value of the equipment in a waterless state; ΔC represents the offset of the current detection value relative to the reference value.

[0042] Finally, the difference is compared with a set threshold. For example, if ΔC ≥ 10pF, water is considered to exist; if ΔC < 10pF, water is considered to be absent.

[0043] 104. Based on the water level status, control and manage the operation status of the water pump of the target pet drinking water equipment.

[0044] In this embodiment of the invention, the target pet drinking device uses periodic water capacitance detection and comparison to determine the current water level in real time. When it is determined to be in a state of no water, the control chip will issue a command to start the water pump to achieve automatic water replenishment. When it is determined to be in a state of water, the control chip will control the water pump to remain off to avoid repeated water filling or running dry.

[0045] The specific steps to start and stop the water pump are as follows: If the water level is "no water" and the water pump is not currently running, the control chip outputs a high level to the water pump driver module (such as a MOSFET or relay) to start the water pump. Set a soft timer (e.g., run for a maximum of 20 seconds); If the water level is "water present" and the water pump is currently running, the control chip outputs a low level to stop the water pump. Clear the soft timer.

[0046] In this embodiment of the invention, a reference value of the water capacitance of the target pet drinking device in a waterless state is obtained; when the target pet drinking device is operating normally, the real-time detection value of the water capacitance of the target pet drinking device is collected periodically according to a preset schedule; the water level status in the target pet drinking device is determined by comparing the reference value and the real-time detection value; and the water pump operation status of the target pet drinking device is controlled and managed based on the water level status. By using the no-load calibration value as a reference benchmark and combining it with periodic detection, the presence and absence of water can be accurately distinguished, improving the accuracy of water judgment and effectively avoiding false triggering of water pump operation. It has the advantages of simple structure, low cost, and strong applicability.

[0047] Optionally, in the step of obtaining the reference value of the water capacitance of the target pet watering device in a waterless state, the water capacitance value of the target pet watering device in a waterless state can be collected by grounding a preset test contact before the target pet watering device is first powered on; and the water capacitance value of the target pet watering device in a waterless state can be stored as the water capacitance reference value.

[0048] In this embodiment of the invention, the aforementioned preset test contact can be an external pin designed for production testing or initial configuration, typically connected to a certain I / O port of the control chip, and does not interact with the user during normal device use. For example, it can be as follows: Figure 2The T8 pin in the circuit diagram is grounded. When laying out the PCB, this pin is reserved in the form of gold fingers, pads, fixture contact points, etc., to facilitate grounding operations of production line fixtures (such as probe fixtures).

[0049] When the test contact is grounded, the control chip reads that the pin is low when it is powered on for the first time, thus identifying that it is currently in "factory calibration mode". At this time, the device has not been filled with water and is in a waterless state. The detection electrode (such as EC1) is surrounded by air, and the capacitance value represents the no-load state.

[0050] At this point, the control chip starts the capacitance sampling logic, which collects the capacitance value detected by the current sensor electrode (e.g., 31.8 pF). This value is the reference value of the water capacitance of the device itself in a waterless state. After sampling is completed, the capacitance value will be written into the memory of the control chip for use as a reference for water level judgment during subsequent operation.

[0051] Optionally, when the target pet water drinking device is operating normally, before the steps of periodically collecting the real-time detection value of the water capacitance of the target pet water drinking device include: determining the current first preset period based on the detection interval data of the target pet water drinking device; determining the vibration state of the water capacitance of the target pet water drinking device; determining the adjustment data of the preset period based on the vibration state; adjusting the current first preset period based on the adjustment data to obtain a second preset period; and collecting the real-time detection value of the water capacitance of the target pet water drinking device according to the second preset period.

[0052] In this embodiment of the invention, the above-mentioned detection gap data can be the difference (i.e., the change) between each group of adjacent capacitance values ​​during several consecutive real-time detections of water capacitance. It is used to measure the fluctuation characteristics of the capacitance signal over a period of time. Generally, N real-time capacitance values ​​can be continuously collected by setting a window length N (e.g., 5 detection points), and the difference between each two values ​​can be calculated to form a gap data sequence.

[0053] The aforementioned shaking state can be used to confirm the contact frequency between the water capacitor and the water level. Generally speaking, it can refer to the continuous, small-amplitude, bidirectional fluctuation of the water capacitor detection value in a short period of time, indicating that the sensor is experiencing an unstable state. This usually occurs at the water surface boundary, in a highly sensitive area, or is affected by factors such as bubbles, vibration, and electromagnetic interference. By analyzing the shaking state, unstable factors such as bubbles, vibration, and water surface boundary can be ruled out in determining the presence or absence of water.

[0054] Specifically, it can be determined using the following algorithm: 3-5 consecutive detection intervals (difference): All are less than the set micro-threshold (e.g., ±1.0 pF). Furthermore, the directions of fluctuation are inconsistent; It is then determined to be in a "jittering state".

[0055] The aforementioned first preset period can be the water capacitor sampling period time interval set by the target pet drinking device during the default or startup phase, in milliseconds, and is used to represent the basic sampling frequency used before jitter analysis is performed.

[0056] The aforementioned adjustment data can be control parameters generated based on the current detection status (whether there is jitter) to adjust the original sampling period. By confirming the adjustment data, the sampling frequency can be dynamically adjusted to improve the response speed in unstable states or save resources in stable states.

[0057] The aforementioned second preset period can refer to a new sampling period obtained by superimposing or transforming the first preset period with the adjustment data. This new period is used for dynamic control of subsequent water capacitance acquisition. Through this dynamic period adjustment mechanism, the system can adapt the sampling strategy according to the actual operating conditions to achieve a balance between detection sensitivity and system load.

[0058] In one possible embodiment, after the target pet drinking device enters normal operation, dynamic analysis is performed to determine whether the detection cycle needs to be adjusted. Specifically, in the initial state, a default sampling cycle, called the first preset cycle, is set to periodically collect real-time detection values ​​of water capacitance. Before entering periodic collection, the trend and interval information of water capacitance value changes in the past multiple sampling cycles are first read to form detection gap data. The control chip analyzes these interval data to determine the frequency and amplitude of capacitance value changes in continuous cycles, thereby determining whether the current capacitance curve shows a jittering state. If jitter is determined to exist (e.g., frequent jumps in capacitance value, fluctuations exceeding micro thresholds), a set of adjustment data will be generated according to the established scheduling logic, including suggestions to shorten or extend the sampling interval. Based on the adjustment data, the original first preset cycle is dynamically adjusted to obtain a second preset cycle. Then, according to the second preset cycle, the next stage of water capacitance value collection and judgment operation continues.

[0059] Optionally, the step of collecting the real-time water capacitance value of the target pet water device in a preset periodic manner during normal operation may further include collecting the water capacitance value in real time according to the time interval corresponding to the preset periodicity when the target pet water device is detected to be operating normally, and caching the collected real-time water capacitance value.

[0060] In this embodiment of the invention, after the target pet drinking device completes power-on initialization and water capacitance reference value calibration, it enters normal operation and begins to execute a water capacitance detection process based on a preset periodicity.

[0061] Specifically, after detecting that the target pet drinking device has entered normal operation, a timed task is started, that is, at each preset time interval, a real-time detection value of water capacitance is collected. This may include: activating the detection electrode EC1; controlling the AD converter or capacitance measurement circuit to obtain the current capacitance value (unit: picofarad / pF); and writing the detection value into an internal cache queue or memory data structure for subsequent processing.

[0062] By following the above methods and steps, misjudgments caused by single abnormal fluctuations can be avoided, and the methods can be used for sliding window analysis and water level change trend identification.

[0063] Optionally, in the step of comparing the water capacitance reference value and the real-time water capacitance detection value to determine the water level status of the current target pet drinking device, the method further includes calculating the difference between the real-time water capacitance detection value and the water capacitance reference value within multiple preset periods to obtain multiple water capacitance difference values; when the water capacitance difference value within a consecutive preset number of periods is greater than or equal to the water capacitance reference value, the target pet drinking device is determined to be in a water-containing state; when the water capacitance difference value within a consecutive preset number of periods is less than the water capacitance reference value, the target pet drinking device is determined to be in a waterless state.

[0064] In this embodiment of the invention, the above-mentioned difference calculation can be performed by subtracting the real-time detection value of the water capacitance collected each time from the reference value under the initial no-load state to obtain an offset reflecting the water level status.

[0065] The above-mentioned water capacitance difference can be the result of the difference calculation in each detection cycle, representing the "variation range" of the current water capacitance state relative to the reference value. Generally speaking, it can be used to construct continuous state judgment and as an input signal to the "water level state judgment logic". It can also participate in additional functions such as fluctuation analysis and jitter recognition.

[0066] In one possible embodiment, after collecting the real-time detection value of water capacitance in each cycle, the difference between the value and the reference capacitance value stored by the device in the waterless state is calculated. The water capacitance difference of multiple consecutive cycles can be used as the judgment basis. If all differences exceed the preset judgment threshold, it is judged to be in a water-containing state; if any difference does not reach the threshold, it is judged to be in a waterless state.

[0067] This multi-cycle difference judgment mechanism can effectively resist the influence of vibration noise and improve the accuracy of water level judgment.

[0068] Optionally, the step of determining the water level status in the target pet drinking device by comparing the reference value and the real-time detection value of the water capacitor also includes: determining the environmental data of the water capacitor; determining error adjustment data for the real-time detection value of the water capacitor based on temperature and humidity data; adjusting the real-time detection value of the water capacitor based on the error adjustment data to obtain the target real-time detection value of the water capacitor; and comparing the target real-time detection value of the water capacitor with the reference value of the water capacitor to obtain the water level status in the target pet drinking device.

[0069] In this embodiment of the invention, the aforementioned environmental data may include, but is not limited to, temperature data and humidity data. Specifically, it may be the physical environmental parameters of the current external environment or the interior of the housing collected by temperature and humidity sensors during the operation of the target pet drinking device. It is understood that environmental conditions can affect the capacitance value of a capacitor, thereby affecting the determination of the presence or absence of water. For example, high humidity may cause residual moisture on the electrode surface, high temperature can change the dielectric constant of the material, and temperature drift may cause ADC offset or circuit noise.

[0070] The aforementioned error adjustment data can be a capacitance correction calculated based on environmental data, used to correct for offsets caused by environmental changes. Specifically, this error adjustment data can be confirmed using the following compensation function: ; Where T / H represents the current temperature and humidity, T0 / H0 represents the standard temperature and humidity (e.g., 25℃, 50%), and a / b represents the empirical compensation coefficient (e.g., a=0.15pF / ℃, b=0.08pF / %RH).

[0071] In one possible embodiment, the corresponding error adjustment data is determined by the above-mentioned compensation function and used to adjust the above-mentioned real-time water capacitance detection value. After adjustment, the final target real-time water capacitance detection value is obtained, which is the data used for comparison with the reference value.

[0072] Specifically, while collecting real-time water capacitance values, the system reads the current ambient temperature and humidity data to form environmental data. Based on this environmental data, capacitance error adjustment data is calculated, and the original collected water capacitance values ​​are compensated and adjusted to obtain the target real-time water capacitance value. Subsequently, the target real-time water capacitance value is compared with the water capacitance reference value to improve the accuracy of water level detection in extreme environments such as high temperature and high humidity, and reduce the false judgment rate.

[0073] Optionally, in the step of controlling and managing the operation status of the water pump of the target pet drinking device based on the water level status, the water pump can be started when the water level status is continuously in a waterless state for multiple consecutive sampling cycles; and the water pump can be stopped when the water level status is continuously in a water-containing state for multiple consecutive sampling cycles.

[0074] In this embodiment of the invention, a multi-cycle status confirmation mechanism is introduced to control the operating status of the water pump. Specifically, when the water level is determined to be empty for multiple consecutive detection cycles, the water pump is controlled to start running; when the water level is determined to be full for multiple consecutive detection cycles, the water pump is controlled to stop running.

[0075] The above strategies can effectively filter out jitter signals and momentary misjudgments, preventing the water pump from switching frequently due to false triggering, thereby improving control accuracy and equipment stability.

[0076] like Figure 3 As shown, this embodiment of the invention also provides a non-contact water level detection and management device 300, which includes: The first acquisition module 301 is used to acquire the reference value of the water capacitance of the target pet drinking device in a waterless state; The first acquisition module 302 is used to acquire the real-time detection value of the water capacitance of the target pet drinking device through a preset periodicity when the target pet drinking device is operating normally. The first determining module 303 is used to compare the water capacitance reference value and the real-time detection value of the water capacitance to determine the current water level status in the target pet drinking device. The first control module 304 is used to control and manage the operation status of the water pump of the target pet drinking device based on the water level status.

[0077] Optionally, the first acquisition module 301 mentioned above further includes: The first acquisition submodule is used to collect the water capacitance value of the target pet watering device in a waterless state by grounding a preset test contact before the target pet watering device is powered on for the first time. The storage submodule is used to store the water capacitance value of the current target pet drinking device in a waterless state as the water capacitance reference value.

[0078] Optionally, the above-mentioned device further includes: The first determining submodule is used to determine the current first preset cycle based on the detection gap data of the target pet drinking device; The second determining submodule is used to determine the shaking state of the water capacitor of the target pet drinking device, and the shaking state is used to confirm the contact frequency between the water capacitor and the water level. The third determining submodule is used to determine preset periodic adjustment data based on the jitter state; The fourth determining submodule is used to adjust the current first preset period based on the adjustment data to obtain a second preset period; The real-time acquisition submodule is used to acquire the real-time detection value of the water capacitance of the target pet drinking device according to the second preset period.

[0079] Optionally, the first acquisition module 302 mentioned above includes: The periodic detection submodule is used to collect water capacitance values ​​in real time according to the time interval corresponding to the preset period when the target pet drinking device is detected to be operating normally, and to cache the collected real-time water capacitance values.

[0080] Optionally, the first determining module 303 mentioned above includes: The calculation submodule is used to calculate the difference between the real-time detection value of water capacitance and the reference value of water capacitance within multiple preset periods, and obtain multiple water capacitance differences. The fifth determining submodule is used to determine that the target pet drinking device is in a water-containing state when the water capacitance difference is greater than or equal to the water capacitance reference value within a consecutive preset number of cycles. The sixth determination submodule is used to determine that the target pet drinking device is in a waterless state when the water capacitance difference is less than the water capacitance reference value within a consecutive preset number of cycles.

[0081] Optionally, the above-mentioned device further includes: The seventh determination submodule is used to determine the current environmental data of the water capacitor, including temperature data and humidity data. The eighth determining submodule is used to determine error adjustment data for the real-time detection value of the water capacitor based on the temperature data and humidity data; The adjustment submodule is used to adjust the real-time detection value of the water capacitor based on the error adjustment data to obtain the target real-time detection value of the water capacitor. The processing submodule is used to compare the real-time detection value of the target water capacitance with the reference value of the water capacitance to obtain the current water level status in the target pet drinking water device.

[0082] Optionally, the first control module 304 mentioned above includes: The first control submodule is used to control the water pump to start running when the water level is continuously in a state of no water for multiple consecutive sampling cycles; The second control submodule is used to control the water pump to stop operating when the water level remains in a water-containing state for multiple consecutive sampling cycles.

[0083] like Figure 4 As shown, this embodiment of the invention also provides an electronic device 400, including a processor, which can execute any of the above-described non-contact water level detection and management methods.

[0084] Specifically, it includes a processor 401 and a memory 402, as well as a computer program stored in the memory 402 and capable of running on the processor 401 to execute the non-contact water level detection and management method, wherein: The processor 401 executes the calculator program for the non-contact water level detection and management method stored in the memory 402, and performs the following steps: Obtain the reference value of the water capacitance of the target pet water device in a waterless state; When the target pet drinking device is operating normally, the water capacitance value of the target pet drinking device is collected in real time through a preset periodic method. Based on the comparison between the water capacitance reference value and the real-time water capacitance detection value, the current water level status in the target pet drinking device is determined. Based on the water level status, the operation status of the water pump of the target pet drinking water device is controlled and managed.

[0085] Optionally, the processor 401 performs the process of obtaining the water capacitance reference value of the target pet drinking device in a waterless state, including: Before the target pet watering device is powered on for the first time, the preset test contact is grounded and the water capacitance value of the target pet watering device in the current waterless state is collected. The water capacitance value of the current target pet drinking device in a waterless state is stored as the water capacitance reference value.

[0086] Optionally, before the processor 401 executes the step of periodically collecting the real-time detection value of the water capacitance of the target pet drinking device during normal operation, the method further includes: Based on the detection interval data of the target pet drinking device, the current first preset cycle is determined; Determine the vibration state of the water capacitor in the target pet drinking device, wherein the vibration state is used to confirm the contact frequency between the water capacitor and the water level; Based on the jitter state, determine the preset periodic adjustment data; Based on the adjustment data, the current first preset period is adjusted to obtain a second preset period; According to the second preset period, the real-time detection value of the water capacitance of the target pet drinking device is collected.

[0087] Optionally, the processor 401 executes the step of periodically collecting real-time detection values ​​of the water capacitance of the target pet drinking device during normal operation, including: When the target pet drinking device is detected to be operating normally, the water capacitance value is collected in real time according to the preset periodic time interval, and the collected real-time water capacitance value is cached.

[0088] Optionally, the processor 401 further executes the process of determining the water level status, which includes a water-containing state and a water-free state, by comparing the water capacitance reference value and the real-time water capacitance detection value. This process includes: The difference between the real-time detection value of water capacitance and the reference value of water capacitance within multiple preset periods is calculated to obtain multiple water capacitance differences. When the difference between water capacitance and water capacitance is greater than or equal to the reference value of water capacitance within a consecutive preset number of cycles, the target pet drinking device is determined to be in a water-containing state. If the difference in water capacitance is less than the reference value of water capacitance within a consecutive preset number of cycles, then the target pet drinking device is determined to be in a waterless state.

[0089] Optionally, the processor 401 further performs the comparison processing based on the water capacitance reference value and the real-time water capacitance detection value to determine the current water level status in the target pet drinking device. The method further includes: Determine the current environmental data of the water capacitor, including temperature data and humidity data; Based on the temperature and humidity data, error adjustment data for the real-time detection value of the water capacitor is determined; The real-time detection value of the water capacitor is adjusted based on the error adjustment data to obtain the target real-time detection value of the water capacitor. The water level status in the target pet drinking device is obtained by comparing the real-time detection value of the target water capacitance with the reference value of the water capacitance.

[0090] Optionally, the processor 401 further performs the control and management of the water pump operation status of the target pet drinking device based on the water level status, including: When the water level remains at a zero level for multiple consecutive sampling cycles, the water pump is controlled to start operation. When the water level remains in a water-containing state for multiple consecutive sampling cycles, the water pump is controlled to stop operating.

[0091] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the non-contact water level detection and management method or the application-side non-contact water level detection and management method provided in this invention, and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0092] Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be done by a computer program instructing related hardware, and can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0093] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A non-contact water level detection and management method, characterized in that, include: Obtain the reference value of the water capacitance of the target pet water device in a waterless state; When the target pet drinking device is operating normally, the water capacitance value of the target pet drinking device is collected in real time through a preset periodic method. Based on the comparison between the water capacitance reference value and the real-time water capacitance detection value, the current water level status in the target pet drinking device is determined. Based on the water level status, the operation status of the water pump of the target pet drinking water device is controlled and managed.

2. The non-contact water level detection and management method as described in claim 1, characterized in that, The process of obtaining the reference value of the water capacitance of the target pet drinking device in a waterless state includes: Before the target pet watering device is powered on for the first time, the preset test contact is grounded and the water capacitance value of the target pet watering device in the current waterless state is collected. The water capacitance value of the current target pet drinking device in a waterless state is stored as the water capacitance reference value.

3. The non-contact water level detection and management method as described in claim 1, characterized in that, Before periodically collecting the real-time water capacitance value of the target pet drinking device during normal operation, the method further includes: Based on the detection interval data of the target pet drinking device, the current first preset cycle is determined; Determine the vibration state of the water capacitor in the target pet drinking device, wherein the vibration state is used to confirm the contact frequency between the water capacitor and the water level; Based on the jitter state, determine the preset periodic adjustment data; Based on the adjustment data, the current first preset period is adjusted to obtain a second preset period; According to the second preset period, the real-time detection value of the water capacitance of the target pet drinking device is collected.

4. The non-contact water level detection and management method as described in claim 1, characterized in that, The step of periodically collecting real-time water capacitance values ​​of the target pet drinking device during normal operation includes: When the target pet drinking device is detected to be operating normally, the water capacitance value is collected in real time according to the preset periodic time interval, and the collected real-time water capacitance value is cached.

5. The non-contact water level detection and management method as described in claim 1, characterized in that, The water level status includes a water-containing state and a water-free state. The process of determining the current water level status in the target pet drinking device by comparing the water capacitance reference value and the real-time water capacitance detection value includes: The difference between the real-time detection value of water capacitance and the reference value of water capacitance within multiple preset periods is calculated to obtain multiple water capacitance differences. When the difference between water capacitance and water capacitance is greater than or equal to the reference value of water capacitance within a consecutive preset number of cycles, the target pet drinking device is determined to be in a water-containing state. If the difference in water capacitance is less than the reference value of water capacitance within a consecutive preset number of cycles, then the target pet drinking device is determined to be in a waterless state.

6. The non-contact water level detection and management method as described in claim 5, characterized in that, The method for determining the current water level in the target pet drinking device by comparing the water capacitance reference value and the real-time water capacitance detection value, further includes: Determine the current environmental data of the water capacitor, including temperature data and humidity data; Based on the temperature and humidity data, error adjustment data for the real-time detection value of the water capacitor is determined; The real-time detection value of the water capacitor is adjusted based on the error adjustment data to obtain the target real-time detection value of the water capacitor. The water level status in the target pet drinking device is obtained by comparing the real-time detection value of the target water capacitance with the reference value of the water capacitance.

7. The non-contact water level detection and management method as described in claim 5, characterized in that, The control and management of the water pump operation status of the target pet drinking device based on the water level status includes: When the water level remains at a zero level for multiple consecutive sampling cycles, the water pump is controlled to start operation. When the water level remains in a water-containing state for multiple consecutive sampling cycles, the water pump is controlled to stop operating.

8. A non-contact water level detection and management device, characterized in that, include: The first acquisition module is used to acquire the reference value of the water capacitance of the target pet drinking device in a waterless state; The first acquisition module is used to acquire the real-time detection value of the water capacitance of the target pet drinking device through a preset periodicity when the target pet drinking device is operating normally. The first determining module is used to compare the water capacitance reference value and the real-time detection value of the water capacitance to determine the current water level status in the target pet drinking device. The first control module is used to control and manage the operation status of the water pump of the target pet drinking device based on the water level status.

9. An electronic device, characterized in that, include: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the non-contact water level detection and management method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the non-contact water level detection and management method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Liquid level detection circuit assembly and beverage machine

    CN121702501A