Water depth measuring system based on position type PID (Proportion Integration Differentiation) control algorithm
Through the water depth measurement system based on the positional PID control algorithm, the problems of low efficiency and high cost of traditional swimming pool water quality monitoring mode are solved, real-time accurate monitoring and automated management of water quality parameters are realized, and the water environment of the swimming pool is adapted to the swimming pool.
Patent Information
- Application Number
- CN202510363879.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-06-27
AI Technical Summary
The traditional swimming pool water quality monitoring model is inefficient, costly and lagging in management, making it difficult to achieve real-time and accurate water quality parameter monitoring and automated management.
The water depth measurement system based on the position PID control algorithm is adopted, and real-time monitoring and automated management of water quality parameters is achieved through the ARM control center, the water depth measurement module, multi-sensor and peristaltic pump layered sampling technology.
It improves the detection efficiency of water quality monitoring, reduces operation and maintenance costs, realizes real-time accurate monitoring and automated management of water quality parameters, and adapts to the water environment of the swimming pool.
Smart Images

Figure CN120215249A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of swimming pool water quality monitoring sensors technology and data acquisition, and particularly to a water depth measurement system based on a positional PID control algorithm. Background Art
[0002] In recent years, with the continuous improvement of living standards, going to swimming pools for swimming exercises and leisure and entertainment has become a common choice for the public. At the same time, the public's attention to the safety of pool water quality has increased significantly, which also puts forward higher requirements for the work of pool water hygiene detection. It is urgent to increase the detection frequency and update a new generation of water quality monitoring systems to ensure that the water quality meets the standards.
[0003] At the same time, with the development of modern instrument and equipment towards the direction of intelligence, automation and remote control, its operation efficiency has been significantly improved and the cost has been effectively controlled. For the core indicator of swimming pool water quality safety in public health management, the traditional manual monitoring mode has problems such as low efficiency, high cost and management lag. A water depth measurement system based on a positional PID control algorithm proposed by the present invention can achieve real-time and accurate monitoring and automatic management of water quality parameters in different water layers through intelligent technology, and has significant advantages in improving detection efficiency, reducing operation and maintenance costs and portability. Summary of the Invention
[0004] The present invention provides a water depth measurement system based on a positional PID control algorithm that overcomes or at least partially solves the above problems.
[0005] The technical solution of the present invention is as follows: A water depth measurement system based on a positional PID control algorithm includes: an ARM control center area, a first acquisition mechanism area, a second acquisition mechanism area, a power supply conversion area, and a comparison standard solution storage area.
[0006] The present invention adopts a functional partition layout design. The above five functional module areas are integrated in the device shell in sequence, and metal partitions are arranged between adjacent partitions for physical isolation, effectively reducing electromagnetic interference and signal crosstalk between each working area. The ARM control center, as the core processing unit, establishes a two-way signal communication link with the three major functional areas of the first acquisition mechanism area, the second acquisition mechanism area, and the power supply conversion area through shielded twisted pair wires. The power supply conversion area is configured with a wide-voltage input interface, supporting AC 220V / 50Hz mains power or DC 12V lithium battery power supply input. After multi-stage rectification, filtering and DC-DC conversion processing, it outputs a matching voltage that meets the electrical specifications of the three major functional areas, and realizes split power supply transmission through independent shielded power cables.
[0007] Preferably, the ARM control center area includes an ARM controller, a Wi-Fi module, and a human-machine interaction module. The ARM controller includes a multi-channel 12-bit ADC peripheral, the number of ADC channels meets the requirements of the present invention, and also includes a UART peripheral, an IIC peripheral, and multiple GPIO ports; the Wi-Fi module establishes a physical layer connection with the ARM controller through a UART serial communication interface, and the ARM controller drives the Wi-Fi module to complete the initialization of the network protocol stack through an AT instruction set, enabling the water quality monitoring device to access the Internet based on the MQTT protocol. The ARM controller establishes a persistent session connection with the cloud service platform through an MQTT client to complete the two-way transmission of sensor data upstream and cloud platform control instructions downstream, and finally realizes the real-time visual monitoring of water quality health data (water depth / pH / turbidity / water temperature, etc.) on the mobile APP; the human-machine interaction module includes an OLED display screen and a voice dialogue module, the OLED display screen communicates with the ARM controller through the IIC protocol, and the voice dialogue module communicates with the ARM controller through the UART protocol.
[0008] Preferably, the first collection mechanism area is mainly based on the water depth measurement module, and the measurement object is the water depth of the swimming pool. The water depth measurement module includes a water depth measurement circuit board and a water depth measurement device mechanism. The water depth measurement circuit board mainly includes two non-locking push-button switches. The first pins of the two non-locking push-button switches are both grounded, the second pins are respectively connected to the circuit board output ports, and the third pins are both connected to high level. The circuit board has an output port with two pins, which serves as the end interface of the soft suspension line in the water depth measurement device mechanism. One foot of the output port is connected to one end of a resistor, and the other end of the resistor is grounded. The other foot of the output port is connected to the circuit board output port.
[0009] Preferably, the water depth measuring device mechanism is combined with a water depth measuring circuit board to measure the water depth of the swimming pool. The first DC geared motor with a coding disk on the water depth measuring device mechanism is controlled by the ARM controller for its forward and reverse rotation and speed, and then controls the lifting and speed of the water surface detection mechanism driven by a flexible wire. The water surface detection mechanism consists of a conical iron block, a first water immersion sensor, and a resistive liquid level sensor. When a command to measure the water depth of the swimming pool is sent to the ARM controller, the ARM controller will first judge the levels connected to the first non-latching push-button switch and the second non-latching push-button switch, so as to judge whether the water surface detection mechanism is in the initial position, that is, the water surface detection mechanism is tightened by the flexible wire, making both non-latching push-button switches in the pressed state; after the initial position, the ARM controller will issue a command to control the first DC geared motor to rotate forward, that is, the rotor of the motor reduction group rotates the winding drum forward. The groove of the winding drum is connected with a flexible wire, and the other end of the flexible wire is connected to the water surface detection mechanism. The forward rotation of the winding drum will control the water surface detection mechanism to be in the descending state, that is, the second state. During the second state, the coding disk will record the number of pulses generated by the rotation of the motor rotor. During this second state, the sensors on the water surface detection mechanism will be used to judge the water surface position. Once the probe of the water immersion sensor touches the water surface, its electrical signal will be read by the ARM controller. The ARM controller will control the motor speed. When the water surface is parallel to the bottom surface of the column of the resistive liquid level sensor, the resistive liquid level sensor will be read by the ARM controller for its feedback signal. The ARM controller implements PID closed-loop control on the driving motor based on this feedback signal, so as to improve the detection accuracy of the water surface marking signal. During the operation of the second state, when the elastic buffer contact of the water surface detection mechanism touches the bottom of the swimming pool, the tension of the flexible wire disappears, resulting in the reset and disconnection of the first non-latching push-button switch. This state change signal is transmitted to the ARM controller and recorded as the bottom reference mark; after the second state, the ARM controller will issue a command to control the first DC geared motor to rotate in the reverse direction, that is, the rotor of the motor reduction group rotates the winding drum in the reverse direction, so that the water surface detection mechanism is in the ascending state, that is, the third state. During the third state, once the top surface of the column of the resistive liquid level sensor on the water surface detection mechanism touches and presses the iron ring fixed by the second non-latching push-button switch, its switch pin electrical signal will be read by the ARM controller. The ARM controller will control the motor to decelerate until it stops, that is, return to the initial position. During the process from the initial position to the first state, then to the second state, and finally back to the initial position, the ARM controller reads the number of pulses of the coding disk and marks the signals corresponding to each position, and analyzes and converts the read data into the water depth data of the swimming pool to be measured.
[0010] Preferably, the main body of the second collection mechanism area includes a pH sensor, a second water immersion sensor, a temperature sensor, a turbidity sensor, a water pump, and a sampling tank, and the measurement object is a swimming pool. The pH sensor electrode will be placed into the pool water sample to be measured through the first opening on the sampling tank, and can also be directly taken out and placed into the swimming pool to detect the pH value of the pool water; the second water immersion sensor is installed and fixed on the inner wall of the sampling tank to judge the water level of the pool water sample in the sampling tank; the temperature sensor is installed and fixed on the inner wall of the sampling tank, and its temperature probe does not contact the inner wall to avoid errors in water temperature measurement caused by external temperature; the turbidity sensor is installed and fixed on the bottom of the sampling tank, and the sampling tank is made of light-proof material to avoid adverse effects of external light on turbidity collection; the water pump uses peristaltic pumping to achieve physical isolation and reduce the pollution of the pool water during the pumping process; a suspension line is fixed at the water inlet port of the water inlet hose of the water pump, and the motor controls the retraction or release of the suspension line to control the positional relationship between the water inlet port and the pool water layer, and then the water quality samples of different pool water layers can be extracted, that is, the water quality parameters of different water layers can be measured. The principle of the motor controlling the lifting of the water inlet port of the water inlet hose is basically the same as the method of the motor controlling the lifting of the water surface detection mechanism described in the depth measurement of the first collection mechanism above.
[0011] Preferably, the power supply conversion area can support the input of AC 220V / 50Hz mains power or DC 12V lithium battery power supply. The DC 12V lithium battery is built into the power supply conversion area and can be charged through an external charger, or energy can be supplemented through a solar panel fixed on the device shell via an intelligent charge and discharge management circuit. After the input power is processed by multi-stage rectification, filtering, and DC-DC conversion, a stable voltage matching the electrical requirements of the ARM control center area, the first collection mechanism area, and the second collection mechanism area is output, and shunt isolation power supply is realized through an independent shielded power cable. The power supply switching logic is automatically determined based on the input priority. When the mains power is connected, the mains power is preferentially used for power supply, and when the mains power is interrupted, it seamlessly switches to DC 12V lithium battery power supply to ensure the continuous and stable operation of the system.
[0012] Preferably, the comparison standard solution storage area is used to store turbidity standard solutions (0NTU, 100NTU) and pH standard buffer solutions (pH = 4.00, 6.86, 7.00, 9.18) to calibrate the measurement data of the turbidity sensor and the pH sensor.
[0013] For the present invention according to the above solution, its beneficial effects are as follows:
[0014] (1) A water depth measurement system based on the positional PID control algorithm provided by the present invention adopts a functional partition layout and physical isolation with metal partitions, effectively reducing electromagnetic interference and signal crosstalk. Shielded twisted-pair cables and independent power supply cables are transmitted in separate circuits, ensuring the stability of data communication and the reliability of power supply, and improving the overall operation accuracy of the system of the present invention.
[0015] (2) A water depth measurement system based on the positional PID control algorithm provided by the present invention combines the PID control algorithm with encoder disk pulse counting. Through the collaborative feedback of dual sensors and dynamic speed regulation of the motor, high-precision marking of the water surface-bottom position and depth conversion are achieved, with a low error rate and adaptation to the swimming pool water environment.
[0016] (3) A water depth measurement system based on the positional PID control algorithm provided by the present invention integrates multi-sensors such as pH, temperature, turbidity, etc. and the peristaltic pump stratified sampling technology, supports the collection and real-time analysis of water samples at different water layers. The light-tight sampling tank and physical isolation design reduce external interference, ensuring the comprehensiveness and accuracy of water quality parameter detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for use in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0018] Figure 1 is the overall block diagram of the present invention;
[0019] Figure 2 is the structural schematic diagram of the first acquisition mechanism of the present invention;
[0020] Figure 3 is the structural schematic diagram of the second acquisition mechanism of the present invention;
[0021] Figure 4 is the simple schematic diagram of the overall structure of the present invention.
[0022] In the attached drawings: 1. ARM control center; 2. Water depth measurement module; 3. Wi-Fi module; 4. Pool water sampling module; 5. pH / turbidity / water temperature monitoring module; 6. Human-computer interaction module; 7. Power supply module; 8. Cloud platform; 9. Mobile APP; 44. OLED display module; 45. Voice dialogue module; 46. First collection mechanism; 47. Second collection mechanism; 10. First iron ring; 11. Soft suspension line; 12. Water depth measurement circuit board; 13. Second iron ring; 14. Resistive liquid level sensor; 15. Conical iron block; 16. First water immersion sensor; 17. Reel; 18. First DC geared motor; 19. Coding disk; 20. First non-locking push-button switch; 21. Fixed bracket; 22. Second non-locking push-button switch; 23. Water surface detection mechanism; 24. Copper column probe; 25. pH electrode sensor; 26. First opening; 27. First signal power line; 28. Second water immersion sensor; 29. Sampling tank; 30. Temperature sensor; 31. Turbidity sensor; 32. Second signal power line; 33. Signal power total port; 34. Second opening; 35. Third opening; 36. Third signal power line; 37. Second DC geared motor; 38. Peristaltic water pump head assembly; 39. Outlet hose; 40. Hard pipe; 41. Inlet hose; 42. Fourth signal power line; 43. Peristaltic water pump; 48. Device housing; 49. ARM control center area; 50. First collection mechanism area; 51. Power supply conversion area; 52. Second collection mechanism area; 53. First opening of the device housing; 54. Second opening of the device housing; 55. Housing base; 56. Wi-Fi antenna; 57. Comparison standard solution storage area; 58. External fixing holes of the device; 59. Solar panel; 60. Elastic buffer contact. Detailed implementation manners
[0023] Next, the technical solutions of the present invention will be further clearly and completely described in combination with the drawings in the embodiments of the present invention and through specific implementation manners. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0024] In this specification, the attached drawings are only for illustrative purposes. The presented content is a schematic diagram rather than a physical diagram, and should not be regarded as a limitation on the protection scope of this patent. To clearly display the technical features of the embodiments, some components are subject to proportion adjustment or simplification in the drawings, including but not limited to manifestations such as omission, magnification, or reduction. Such drawing methods should not be used as the basis for determining the actual size of the product. In addition, some conventional structures and related descriptions known to those skilled in the art may be omitted in the drawings, and such technical omissions comply with industry drawing specifications.
[0025] As shown in the attached Figure 1As shown in the figure, a pool water depth measurement system based on a positional PID control algorithm consists of an ARM control center, a water depth measurement module, and multiple functional modules. The core of the system is the ARM control center 1, which is responsible for coordinating the operation of each module and executing the control algorithm. The water depth measurement module 2 serves as the first acquisition mechanism 46, which monitors the pool water level parameters in real time. At the same time, the system is configured with a second acquisition mechanism, including a pool water sampling module 4 and a pH / turbidity / water temperature monitoring module 5, which are used to obtain pool water samples and multiple water quality indicators.
[0026] The human-computer interaction module 6 consists of an OLED display module 44 and a voice dialogue module 45, which realizes the intuitive display and interaction functions of data. The power supply module 7 provides stable power support for the entire system. Through the Wi-Fi module 3, this system can upload the processed water quality parameters to the cloud in real time, and use the cloud data analysis tool for in-depth processing and long-term data accumulation, and finally generate a comprehensive report on the health of the pool water quality. All water quality parameters and analysis reports are synchronously pushed to users through the mobile APP, realizing remote visual monitoring of the pool water quality status.
[0027] As Figures 1 to 4 shown, a solar panel 59 with the same area as the upper surface is fixedly installed directly above the device housing 48, and the model is 12V - 1.5W. This solar panel serves as one of the energy supplement sources of the DC 12V lithium battery after being converted by the solar panel charge and discharge management circuit in the power supply conversion area 51. An external Wi-Fi antenna 56 of the Wi-Fi module 3 in the ARM control center area 49 is fixedly installed on the outside of the device housing 48. The total height of this Wi-Fi antenna 56 is 11 cm, and it can be detached and stored in the buckle groove on the inner wall of the device housing 48. Equal-sized housing bases 55, a first opening 53 of the device housing, and a second opening 54 of the device housing are fixedly installed at the four bottom corners of the lower layer plate of the device housing 48. At the same time, there are three external fixing holes 58 on its right side plate, and these three holes can be used to install and fix this device on the iron frame fixedly matched at the edge of the swimming pool. The device housing 48 plays a role in preventing rainwater and pool water from entering the device interior and damaging the system equipment. The interior of the device housing 48 is divided into a comparison standard solution storage area for storing various standard buffer solutions.
[0028] As Figures 1 to 4 shown, the interior of the device housing 48 includes a first acquisition mechanism area 50, and the main body of this functional area consists of a water depth measurement circuit board 12 and a water depth measurement device mechanism. The water depth measurement circuit board 12 includes a motor drive circuit, which is responsible for driving the motor chip, and then controlling the forward and reverse rotation and speed adjustment of the first DC reduction motor 18 with an encoder disk 19 fixed on the circuit board. Through the connection between the motor shaft and the wire reel 17, the retraction and release control of the soft suspension line 11 and its speed are realized, so as to control the lifting movement and speed change of the water surface detection mechanism 23.
[0029] In the present invention, the ARM control center 1 sends a Pulse Width Modulation (PWM) signal to the drive motor chip on the water depth measurement circuit board 12. The duty cycle of the PWM signal is positively correlated with the power of the drive motor, thereby affecting the lifting speed of the water surface detection mechanism 23. Specifically, when the control input pin AIN1 of the drive motor chip maintains a low level while the control input pin AIN2 is at a high level, the first DC geared motor 18 equipped with an encoder disk 19 will perform a forward rotation; conversely, if AIN1 is at a high level and AIN2 is at a low level, the motor 18 will perform a reverse rotation; if both maintain a low level, the motor 18 will stop rotating. The ARM control center 1 interprets the encoded signals C1 and C2 output by the encoder disk 19, analyzes and processes the signals using its built-in controller, and then accurately calculates the vertical movement distance of the water surface detection mechanism 23 corresponding to each rotation of the shaft of the first DC geared motor 18 according to linear conversion.
[0030] The conical iron block 15 included in the designed water surface detection mechanism 23 has a specific mass to ensure an appropriate downward pressure is exerted on the soft suspension line of the first iron ring 10 fixedly connected by the first non-self-locking push-button switch 20. At this time, the first non-self-locking push-button switch 20 switches from the original signal first contact to the button grounded second contact, and then to the button connected to high level third contact, that is, the signal first contact and the third contact are connected, and the electrical signal changes to the high level state. When the elastic buffer contact 60 on the conical iron block 15 of the water surface detection mechanism 23 touches the bottom of the swimming pool, the downward pressure of the soft suspension line 11 on the first iron ring 10 fixedly connected to the first non-self-locking push-button switch 20 will immediately disappear. Since the elastic deformation amount of the elastic buffer contact 60 is extremely small and can be ignored, it can be considered that the tension of the soft suspension line disappears instantaneously. At this time, the first non-self-locking push-button switch 20 switches from the signal first contact to the button connected to high level third contact, and then to the button grounded second contact, that is, the signal first contact and the second contact are connected, and the electrical signal changes to the low level state. The ARM control center 1 determines whether the elastic buffer contact 60 at the bottom of the water surface detection mechanism 23 controlled by the first DC reduction motor 18 with the coding disk 19 reaches the bottom state of the swimming pool by analyzing the level state of the signal contact 1 of the first non-self-locking push-button switch 20. Set the pulse number N1 at the initial state of the water surface detection mechanism 23 to 0, that is, when the water surface detection mechanism 23 is under the tension of the soft suspension line 11, both non-self-locking push-button switches are in the pressed state, and this is the initial state. During the descent of the water surface detection mechanism 23, the ARM control center 1 reads the pulse signal from the coding disk 19 and records the pulse number. When the elastic buffer contact 60 touches the bottom of the water, the ARM control center 1 determines that the level state of the signal first contact of the first non-self-locking push-button switch 20 is low level, and records the pulse number at this time as N3. After data processing and linear conversion by the ARM control center 1, the distance S from the initial position of the water surface detection mechanism 23 to the bottom of the swimming pool is calculated 13 .
[0031] In order to measure the vertical distance S from the initial position of the water surface detection mechanism 23 to the water surface of the swimming pool 12 , the mechanism includes a first water immersion sensor 16 and a resistive liquid level sensor 14. An ADC peripheral channel pin of the ARM control center 1 is connected to the AOUT analog voltage output terminal of the first water immersion sensor 16. When the copper column probe 24 of the first water immersion sensor 16 touches the water surface of the swimming pool, the ARM control center 1 will collect the AD data from the AOUT analog voltage output terminal. By comparing this AD data with the preset AD reference data value, the ARM control center 1 can determine the contact state between the initial position of the water surface detection mechanism 23 and the water surface of the swimming pool, and record the pulse number at this time as N2. Subsequently, the ARM control center 1 calculates the distance S from the initial position of the water surface detection mechanism 23 to the water surface of the swimming pool through data processing and linear conversion 12 . According to the formula S23 = S 13 - S 12 - S0, where S0 represents the vertical distance from the copper column probe of the first water immersion sensor 16 to the horizontal plane of the lowest contact point of the elastic buffer contact 60, thereby obtaining the pool water depth distance S 23 .
[0032] To ensure accurate measurement of the number of pulses N2 when the water surface detection mechanism 23 descends from the initial position to the triggered water surface state, this system adopts a position PID closed-loop control strategy. When the pool water surface is between the upper and lower circular planes of the column body of the resistive liquid level sensor 14, the ARM control center 1 acquires the analog signal of the resistive liquid level sensor 14 and obtains the digital quantity M representing the actual water surface at the relative column height after quantization by a 12-bit AD converter. This quantity value serves as the target set value for position control and forms a closed-loop control loop with the pulse position signal real-time feedback by the incremental encoder 19. By dynamically adjusting the rotation speed of the first DC reduction motor 18 through the PID algorithm, a linear mapping relationship is established between the vertical displacement of the water surface detection mechanism 23 and the digital quantity M of the water surface at the relative column height. Finally, when the liquid level trigger signal is valid, the cumulative number of pulses at this time is recorded as N2.
[0033] For a more accurate description, it is set that when the pool water surface is at the midpoint of the vertical height of the column body of the resistive liquid level sensor 14, the corresponding digital quantity M is 0; when the pool water surface is parallel to the bottom circular plane of the column body of the resistive liquid level sensor 14, the corresponding digital quantity M is 5; when the pool water surface is parallel to the top circular plane of the column body of the resistive liquid level sensor 14, the corresponding digital quantity M is -5. By collecting the AD data of the column body of the resistive liquid level sensor 14 at different height positions, based on these data, the height of the column body of the resistive liquid level sensor 14 can be divided into 11 equally divided intervals, corresponding to the digital quantities M = -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 from the top surface to the bottom surface of the column body. These 11 digital quantities M will serve as the feedback quantity of the position PID control algorithm, with the digital quantity M = 0 as the target value and the digital quantity M corresponding to the actually collected AD data value as the actual value, and then control the operating state of the first DC reduction motor 18 to ensure that the pool water surface is accurately at the midpoint position of the vertical height of the column body of the resistive liquid level sensor 14. At this time, the ARM control center 1 records the encoder disc pulse number N2', and through data processing and linear conversion, calculates the distance S 12 ' from the initial position of the water surface detection mechanism 23 to the pool water surface. According to the formula S 23 ' = S 13 - S 12 ' - S0', where S0' is the vertical distance from the midpoint of the vertical height of the column body of the resistive liquid level sensor 14 to the horizontal plane of the lowest contact point of the elastic buffer contact 60, thereby measuring the pool water depth distance S23 ’. The measured vertical distance S 12 ’ is the water level of the pool.
[0034] To achieve more effective PID algorithm control, when the first water immersion sensor 16 contacts the water surface and outputs an electrical signal, the ARM control center 1 will receive this electrical signal and accordingly control the rotational speed of the first DC reduction motor 18 to decrease appropriately, so as to ensure that the speed slows down when the water surface passes through the cylinder of the resistive liquid level sensor 14, thereby more accurately reading the change in the analog voltage value output by it.
[0035] After the ARM control center 1 detects the change in the electrical signal generated when the elastic buffer contact 60 of the water surface detection mechanism 23 contacts the bottom of the pool, it will send an instruction to control the first DC reduction motor 18 to reverse, prompting the water surface detection mechanism 23 to rise. During the rising process, once the top circular surface of the water surface detection mechanism 23 contacts the second iron ring 13 connected to the second non-self-locking push-button switch 22, causing an upward pressure on this push-button switch, the switch signal contact will generate a level change. The ARM control center 1 immediately reads this signal change and sends an instruction to control the first DC reduction motor to stop rotating, so that the water surface detection mechanism 23 returns to the initial position, thus completing a water depth measurement task based on the positional PID control algorithm.
[0036] As Figures 1 to 4 shown, a second acquisition mechanism area 52 is provided inside the device housing 48, and the main body of this functional area includes a pool water sampling module 4 and a pH / turbidity / water temperature monitoring module 5. The ARM control center 1 sends a pumping control instruction to the drive chip of the pool water sampling module 4, and this instruction is transmitted through the third signal power line. Subsequently, the peristaltic water pump 43 composed of the peristaltic pump head assembly 38 and the second DC reduction motor 37 is started to begin the pumping operation. The pool water enters the peristaltic pump head assembly 38 through the water inlet hose 41 and then is discharged to the sampling tank 29 through the hard pipe 40 connected to the water outlet hose 39. When the water level in the sampling tank 29 reaches the position of the second water immersion sensor 28, the ARM control center 1 detects a change in the signal line level in the first signal power line 27 and immediately controls the peristaltic water pump 43 to stop the pumping operation.
[0037] The device configures a weight structure at the nozzle of the water inlet hose 41 and integrates a lifting sling assembly, and uses a lift to drive the sling for vertical displacement, thereby realizing the vertical displacement of the port of the water inlet hose 41 to achieve the function of stratified sampling of water layers at different depths. This design ensures that the hose can be accurately positioned to the target water layer, thereby completing the detection of pH value, turbidity, and water temperature parameters in the pool water at different depths.
[0038] Given that the peristaltic water pump 43 is powered by a DC 12V power supply, the flow rate of the pumped pool water can be assumed to be constant. During the process of the water level in the sampling tank 29 rising from 0 to the position of the second water immersion sensor 28, the ARM control center 1 will regularly record the required time T1. To ensure that the sample water in the sampling tank can be completely discharged, the operating duration of the peristaltic water pump 43 in the drainage mode is set to be 10 seconds longer than T1.
[0039] The ARM control center 1 determines whether the water level has reached the height of the second water immersion sensor 28 based on the signal line level signal of the second water immersion sensor 28. If the water level has reached, the ARM control center 1 will sequentially send instructions to control the operation of the pH monitoring module, the turbidity monitoring module, and the water temperature monitoring module. The pH electrode sensor 25 converts the pH value of the pool water into an electrical signal and transmits it through the second signal power line 32. The signal then undergoes signal filtering and amplification processing by the pH monitoring module and is read as a voltage value by a channel in the AD peripheral of the ARM control center 1. Through linear conversion, the collected voltage value is converted into the corresponding pH value. The temperature sensor 30, fixedly installed on the inner wall of the sampling tank 29, converts the temperature of the pool water into an electrical signal and transmits it through the first signal power line 27. After the signal undergoes signal filtering and amplification processing by the water temperature monitoring module, it is read as a voltage value by another channel of the AD peripheral of the ARM control center 1. Through linear conversion, the collected voltage value is converted into the corresponding temperature value. The turbidity sensor 31, fixedly installed at the bottom of the sampling tank, converts the turbidity of the pool water into an electrical signal and transmits it through the fourth signal power line 42. After the signal undergoes signal filtering, amplification, and light source driving processing by the turbidity monitoring module, it is read as a voltage value by the third channel of the AD peripheral of the ARM control center 1. Through a piecewise fitting algorithm, the collected voltage value is converted into the corresponding turbidity value.
[0040] The first signal power line 27, the second signal power line 32, the third signal power line 36, and the fourth signal power line 42 first converge at the signal power total port 33 and then access the corresponding input ports in the ARM control center area 49 through this total port.
[0041] Three functional openings are arranged on the top of the sampling tank 29: the first opening 26 is used to install the pH electrode sensor 25 to monitor the pH value of the pool water in real time, the second opening 34 is used to pass the signal power line to achieve electrical signal transmission, and the third opening 35 serves as the channel for the pool water to drain into the sampling tank 29.
[0042] A water depth measurement system based on a positional PID control algorithm shown above is a specific implementation case of the present invention, fully reflecting the remarkable substantial features and remarkable progress of the present invention. Those skilled in the art can make equivalent modifications to the shape, structure, etc. of the system according to actual usage requirements under the inspiration of the technical solution of the present invention. Such equivalent modification schemes made based on the substantial technical content of the present invention are all covered within the protection scope of the present invention.
Claims
1. A water depth measurement system based on a position PID control algorithm, characterized in that: include: The system comprises an ARM control center (1), a water depth measurement module (2), a Wi-Fi module (3), a pool water sampling module (4), a pH / turbidity / water temperature monitoring module (5), a human-computer interaction module (6) and a power supply module (7). The ARM control center (1) as the core of the system can efficiently coordinate the work of each module to ensure the accurate collection and analysis of multi-parameter (pH / turbidity / water temperature) water quality data, and upload the processed data to the cloud platform (8) through the Wi-Fi module (3), so that users can observe the water quality status in real time on the mobile APP (9).
2. A water depth measurement system based on a position PID control algorithm according to claim 1, characterized in that: The water depth measurement module (2) and the swimming pool form a first collection mechanism (46), and the pool water sampling module (4), the pH / turbidity / water temperature monitoring module (5) and the swimming pool form a second collection mechanism (47).
3. A water depth measurement system based on position PID control algorithm according to claim 2, characterized in that: The first acquisition mechanism (46) includes a water depth measurement module (2) which adopts a lifting measurement method based on a PID control algorithm combined with two trigger switches. The water depth measurement module (2) includes a water depth measurement circuit board (12) and a water depth measurement device mechanism.
4. A water depth measurement system based on position PID control algorithm according to claim 3, characterized in that: The water depth measurement circuit board (12) comprises a first non-self-locking key switch (20) with a certain elasticity and a smooth first iron ring (10) and a second non-self-locking key switch (22) and a smooth second iron ring (13), and the water depth measurement circuit board (12) comprises a power line, a water level data collection output line and a control input line.
5. The water depth measurement system based on position PID control algorithm according to claim 3 is characterized in that: The water depth measuring device mechanism comprises a first DC reduction motor (18) fixed on a water depth measuring circuit board (12) via a fixing frame (21); a code disk (19) with a Hall element and a winding drum (17) are provided on the rotating shaft of the first DC reduction motor (18); a specially made soft suspension wire (11) containing a signal wire is wound on the winding drum (17); the other end of the soft suspension wire (11) is fixedly connected to a water surface detection mechanism (23); and the length of the soft suspension wire (11) can be 1.5 m, 2.0 m or 5 m according to the depth of a swimming pool.
6. A water depth measurement system based on position PID control algorithm according to claim 5, characterized in that: The water surface detection mechanism (23) comprises a cylindrical resistive liquid level sensor (14), a conical iron block (15) and a first water immersion sensor (16). The top circular surface of the resistive liquid level sensor (14) is larger than the circular surface of the second iron ring (13). The cylindrical surface of the resistive liquid level sensor (14) is wrapped with multiple turns of exposed surface metal layers. The multiple turns of exposed surface metal layers are connected to the circuit line to input the output electrical signals into the ARM control center (1). The ARM control center (1) uses the electrical signals to determine whether the horizontal position of the swimming pool water surface is consistent with the resistive liquid level sensor (14). The relative height position relationship of the cylinder of the position sensor (14) is input into the ARM control center (1) in the form of digital quantity after circuit processing. The ARM control center (1) uses the position PID algorithm to control the rotation speed of the first DC reduction motor (18) according to the data information, thereby controlling the descent speed of the water surface detection mechanism (23). The water immersion sensor (16) is surrounded by insulating material and has two small copper column probes (24) embedded in the middle. The copper column probes (24) are connected to the signal line embedded in the soft suspension line (11).
7. A water depth measurement system based on position PID control algorithm according to claim 2, characterized in that: The second collection mechanism (47) comprises a pH electrode sensor (25), a second water immersion sensor (28), a temperature sensor (30), a turbidity sensor (31), a peristaltic water pump (43) and a light-proof cylindrical sampling tank (29).
8. The water depth measurement system based on position PID control algorithm according to claim 7 is characterized in that: The pH electrode sensor (25) probe is placed in the sampling liquid through the first opening (26) on the sampling tank (29); the second water immersion sensor (28) is fixedly mounted at a position where the height of the inner wall of the sampling tank (29) is two-thirds; the temperature sensor (30) is fixedly mounted at a position where the height of the inner wall of the sampling tank (29) is one-half; the turbidity sensor (31) is fixedly mounted at the center of the bottom of the sampling tank (29); the peristaltic water pump (43) is fixedly mounted at a position where the height of the outer wall of the sampling tank (29) is two-thirds; the peristaltic water pump (43) includes a second DC reduction motor (37) and a peristaltic pump head assembly (38); the peristaltic pump head assembly (38) includes an inlet for placing in a swimming pool. A water hose (41) and a water outlet hose (39) for transporting pool water to a sampling tank (29), wherein the sampling tank (29) comprises a first opening (26), a second opening (34), a third opening (35) and a hard tube (40) placed in the tank and fixedly connected to the third opening (35), the second signal power line (32) of the pH electrode sensor (25), the first signal power line (27) of the second water immersion sensor (28), the first signal power line (27) of the temperature sensor (30), the fourth signal power line (42) of the turbidity sensor (31) and the third signal power (36) of the second DC reduction motor (37) are all connected to the signal power main port (33).