A kind of intelligent water pump control method
By detecting the operating current and voltage of the water pump, combined with zero crossing detection and water pressure detection, contactless water flow detection is achieved, solving the problems of inaccurate detection and high cost in the existing water pump control methods, and improving the reliability and economical control.
Patent Information
- Application Number
- CN202410561166.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-05-08
AI Technical Summary
In the existing water pump control method, the flow switch is easily stuck by sand fibers in the water, resulting in the inability to correctly reflect the water flow; other devices have production inconsistencies and the problems of magnetic materials adsorbing impurities, and the cost is high, which affects market promotion.
The operating current and operating voltage of the water pump body are used to determine whether there is water flow based on the changes in the operating power of the water pump. The voltage, current and water pressure are sampled and judged through the zero-crossing detection circuit and the water pressure detection module to achieve contactless detection.
The water flow detection without flow switch is realized, which improves the reliability and consistency of inspection, reduces costs, and reduces the maintenance requirements for flow switches.
Smart Images

Figure CN118327947B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of water pump control, and in particular to an intelligent water pump control method. Background Art
[0002] At present, in the water pumps powered by induction motors, in the corresponding intelligent water pump applications, flow switches are usually used to detect whether the user is using water. When water flows, the water flow switch is activated, and the control board detects this action, which means that the user is using water. This flow switch generally uses a reed switch or a Hall device for contactless detection.
[0003] This control method has the following problems
[0004] 1. Due to sand and fiber in the water, the water flow switch may be stuck, thus failing to correctly reflect the water flow;
[0005] 2. Whether it is a reed switch or a Hall device, there are certain differences. In addition to the differences in structure and magnetic materials, it is difficult to ensure the consistency of mass production, and wrong judgments often occur in actual applications;
[0006] 3. When using magnets as detection components, magnets tend to absorb some impurities in the water, such as iron or other magnetic powders, which can cause detection failure;
[0007] 4. Cost is also something that needs to be considered. If the cost is high, it will be unfavorable for market promotion. Summary of the invention
[0008] In view of the above-mentioned shortcomings (problems) of the prior art, in order to be able to perform new water flow detection and water pump control, the present application provides an intelligent water pump control method.
[0009] To achieve the above-mentioned purpose and other related purposes, the present application adopts the following technical solutions: an intelligent water pump control method, including a water pump body and a controller, the controller detects the operating current and operating voltage of the water pump body, and determines whether there is water flow according to the change of the water pump operating power. When the water pump operating power is stable, it is judged that there is no water flow; when the water pump operating power changes by exceeding the set power threshold, it is judged that there is water flow.
[0010] Optionally, the controller includes a zero-crossing detection circuit, which detects the zero-crossing point of the voltage of the water pump body, obtains the voltage peak point, and performs voltage sampling near the voltage peak point.
[0011] Optionally, the controller detects the current of the water pump body, obtains the current zero point in conjunction with the voltage zero point, and then obtains the current peak point, and performs current sampling near the current peak point.
[0012] Optionally, the controller detects the water pressure of the water pump body and collects water pressure data. When the controller determines that the water pressure data is higher than the water pressure threshold and the power of the water pump body is in a stable state, it determines that the user stops using water, and the controller controls the water pump to stop working.
[0013] Optionally, the controller controls the water pump body to run for a period of time, and determines whether there is a conversion mark. If yes, the controller starts voltage and current sampling conversion, records the conversion times plus one, and then determines whether the conversion times standard is met. If yes, the voltage peak value V and current peak value C are obtained, V×C is calculated, and then the water pressure data is stepped on and converted to calculate the current water pressure;
[0014] If there is no conversion mark, the water pressure sampling conversion is directly performed to calculate the current water pressure;
[0015] If the number of conversions does not meet the number standard, the water pressure sampling conversion is directly performed to calculate the current water pressure;
[0016] Then, first determine whether the water pressure is higher than the preset parameter and the water pressure is stable, and then determine whether the power is stable. If the water pressure is higher than the preset upper limit parameter and is stable, and the power is also stable, then turn off the water pump, convert the water pressure sampling, calculate the current water pressure, and then determine whether the water pressure is lower than the preset lower limit parameter. If the water pressure is lower than the preset lower limit parameter, start the water pump and return to the mark judgment step. If the pressure is higher than the preset lower limit parameter, then return to the step of turning off the water pump.
[0017] If the water pressure is low or unstable or the power is unstable, start the water pump.
[0018] Optionally, the controller further includes a zero-crossing terminal service step:
[0019] When the interrupt service is triggered, step 1: protect the scene; step 2: clear the voltage and current sampling counters; step 3: set the flag to start conversion; step 4: restore the scene and return to the main program.
[0020] Optionally, the controller includes a single-chip microcomputer module, a motor operation control module, a current detection module, a voltage detection module, a water pressure detection module, and a zero-crossing detection module. The motor operation control module, the current detection module, the voltage detection module, the water pressure detection module, and the zero-crossing detection module are respectively connected to the single-chip microcomputer module. The current detection module provides a current detection signal to the single-chip microcomputer module, the voltage detection module provides a voltage detection signal to the single-chip microcomputer module, and the water pressure detection module provides a water pressure detection signal to the single-chip microcomputer module; the zero-crossing detection module provides a voltage zero-crossing signal to the single-chip microcomputer module.
[0021] In summary, the present application includes at least one of the following beneficial technical effects:
[0022] 1. The circuit structure is simple and the method implementation cost is low, which can effectively improve the economic benefits and complete reliable water pump control under reasonable cost control;
[0023] 2. It does not rely on flow switches and does not use reed switches or Hall devices for contactless detection, thereby saving the cost of this component, avoiding component failure, improving work reliability, and reducing the subsequent maintenance cost of the flow switch. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a circuit schematic diagram of an embodiment of the present application;
[0025] Figure 2 This is the circuit diagram of the current detection module;
[0026] Figure 3 This is the circuit diagram of the voltage detection module;
[0027] Figure 4 This is the circuit diagram of the water pressure detection module;
[0028] Figure 5 This is the circuit diagram of the zero-crossing detection module;
[0029] Figure 6 It is the flow chart of water pump control operation;
[0030] Figure 7 It is the interrupt service routine flow chart.
[0031] Description of main reference numerals:
[0032] 1. Water pump body; 2. Controller; 21. Single chip microcomputer module; 22. Motor operation control module; 23. Current detection module; 24. Voltage detection module; 25. Water pressure detection module; 26. Zero crossing detection module. DETAILED DESCRIPTION
[0033] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0034] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The illustrations only show the components related to the present application rather than being drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.
[0035] The specific implementation methods of the present application will be further described below in conjunction with the accompanying drawings.
[0036] Example:
[0037] The embodiment of the present application discloses an intelligent water pump control method, including a water pump body 1 and a controller 2. In an application scenario of the water pump body 1 and the controller 2, the controller 2 controls the water pump body 1, mainly to control the motor of the water pump body 1, and controls the power supply of the motor to control the operation and stop of the water pump body 1. In the water supply of buildings and houses, the water pump body 1 plays the role of boosting water supply to the water pipe (waterway). In daily life, when the high-rise faucet is turned on, water flows in the waterway. When the faucet is closed, no water flows in the waterway. In this solution, water flow sensors are not used, which eliminates a series of subsequent problems that may arise, such as water flow sensor components and installation and maintenance. However, in order to achieve the purpose of water flow detection.
[0038] This solution provides that the controller 2 detects the operating current and operating voltage of the water pump body 1. It is determined whether there is water flow according to the change of the water pump operating power (the power can be estimated by the operating current and voltage of the water pump body 1). When the water pump operating power is stable, it is determined that there is no water flow (no user uses water); when the water pump operating power changes beyond the set power threshold, it is determined that there is water flow (users use water).
[0039] Combination Figure 1 , Figure 2 and Figure 3 , Figure 4 and Figure 5 The controller 2 includes a zero-crossing detection circuit, which detects the zero-crossing point of the voltage of the water pump body 1, obtains the voltage peak point, and performs voltage sampling near the voltage peak point.
[0040] The controller 2 detects the current of the water pump body 1, obtains the current zero-crossing point in conjunction with the voltage zero-crossing point, and then obtains the current peak point, and performs current sampling near the current peak point.
[0041] The controller 2 detects the water pressure of the water pump body 1 and collects water pressure data. When the controller 2 determines that the water pressure data is higher than the water pressure threshold and the power of the water pump body 1 is in a stable state, it determines that the user stops using water, and the controller 2 controls the water pump to stop working.
[0042] In a specific hardware example, the controller 2 includes a single-chip computer module 21, a motor operation control module 22, a current detection module 23, a voltage detection module 24, a water pressure detection module 25, and a zero-crossing detection module 26. The motor operation control module 22, the current detection module 23, the voltage detection module 24, the water pressure detection module 25, and the zero-crossing detection module 26 are respectively connected to the single-chip computer module 21. The current detection module 23 provides a current detection signal to the single-chip computer module 21, the voltage detection module 24 provides a voltage detection signal to the single-chip computer module 21, and the water pressure detection module 25 provides a water pressure detection signal to the single-chip computer module 21; the zero-crossing detection module 26 provides a voltage zero-crossing signal to the single-chip computer module 21.
[0043] The single-chip microcomputer module 21 has three analog-to-digital conversion function pins, ADC1, ADC2, and ADC3, which are used to sample and convert analog signals of current, voltage, and water pressure into digital signals for signal processing. The interrupt signal processing pin XINT is used to process zero-crossing signals. The output pin PB1 of the control water pump body 1 can output high and low levels. The single-chip microcomputer works normally after being connected to the working power supply Vcc and grounded.
[0044] The motor operation control module 22 includes a transistor N1, a relay K1, and a diode D6. The diode D6 is connected in parallel to the coil of the relay K1. The transistor N1 controls the normally open contact of the relay K1 according to the output of the single chip microcomputer, thereby controlling whether the water pump body 1 is enabled.
[0045] Among them, the current detection module 23 includes a current transformer A, resistors R1, R2, capacitor C1, diodes D1 and D2. The current transformer A is used to detect the working current of the water pump motor. Such a circuit is simple and reliable. The signal output by the current transformer is an AC signal. After the resistance-capacitance filtering, the negative half-wave signal is eliminated by D2, and the positive half-wave signal is directly sent to the ADC1 interface of the single-chip microcomputer. The current current value can be obtained through the ADC module. R2 is a sampling resistor. The current transformer generates a current signal that is converted into a voltage signal through R2. D1 is a clamping diode to prevent the signal from exceeding the allowable value of the single-chip microcomputer.
[0046] The voltage detection module 24 includes resistors R3, R4, R5, diodes D3, D4, and capacitor C2. The detection of the water pump motor voltage (live line, neutral line) is carried out by means of resistor voltage division. The voltage between the neutral line and the live line is divided by resistors R3 and R4, and the negative half-wave is removed by diode D4. Then, the signal is filtered by the resistor-capacitor filter circuit composed of R5 and C2. The signal is sent to the ADC2 interface of the single-chip microcomputer, and the current voltage value can be obtained through the ADC2 module of the single-chip microcomputer. D3 is a clamping diode to prevent the signal from exceeding the allowable value of the single-chip microcomputer.
[0047] The water pressure detection module 25 includes a pressure sensor (water pressure sensor), a capacitor C4 and a resistor R9, and directly sends the water pressure detection signal S3 to the ADC3 interface of the single chip microcomputer.
[0048] Finally, the zero-crossing detection module 26 includes resistors R6, R7, R8, capacitors C3, C4, diode D5 and transistor N1. The zero-crossing detection circuit uses N1 to generate a corresponding pulse signal, and the edge of the pulse is the zero-crossing point of the voltage. The positive half-wave of the voltage value of the zero and live wires is removed, N1 is turned on, and what R8 and C3 obtain after filtering is a low level, and the negative half-wave is eliminated by diode D5. At this time, transistor N1 is cut off, and what R8 and C3 obtain after filtering is a high level, and the edge from low to high and the edge from high to low are the zero-crossing points of the voltage signal. At this time, the zero-crossing detection signal S4 is provided to the interrupt function pin of the single-chip microcomputer.
[0049] Based on the above hardware structure, the control mode of the controller 2 is as follows: Figure 6 and Figure 7 understand:
[0050] The controller 2 controls the water pump body 1 to run for a period of time, and determines whether there is a conversion mark. If yes, the controller 2 starts the voltage and current sampling conversion, records the conversion times plus one, and then determines whether the conversion times standard is met. If yes, the voltage peak value V and current peak value C are obtained, V×C is calculated, and then the water pressure data is stepped on and converted to calculate the current water pressure;
[0051] If there is no conversion mark, the water pressure sampling conversion is directly performed to calculate the current water pressure;
[0052] If the number of conversions does not meet the number standard, the water pressure sampling conversion is directly performed to calculate the current water pressure;
[0053] Then, first determine whether the water pressure is higher than the preset parameter and the water pressure is stable, and then determine whether the power is stable. If the water pressure is higher than the preset upper limit parameter and is stable, and the power is also stable, then turn off the water pump, convert the water pressure sampling, calculate the current water pressure, and then determine whether the water pressure is lower than the preset lower limit parameter. If the water pressure is lower than the preset lower limit parameter, start the water pump and return to the mark judgment step. If the pressure is higher than the preset lower limit parameter, then return to the step of turning off the water pump.
[0054] If the water pressure is low or unstable or the power is unstable, start the water pump.
[0055] The controller 2 also includes a zero-crossing terminal service step:
[0056] When the interrupt service is triggered, step 1: protect the scene; step 2: clear the voltage and current sampling counters; step 3: set the flag to start conversion; step 4: restore the scene and return to the main program.
[0057] Further explanation is as follows:
[0058] 1) Sample and convert the voltage and current values every certain time Ts, so that 10ms / Ts values can be sampled within 10ms (Note: for 50HZ power supply, the time is 10ms, for 60HZ power supply, the time is 8.33ms). When to start sampling and conversion is set by the zero-crossing interrupt. Generally speaking, it is more convenient to process if the number of sampling and conversion times in 10ms is not less than 20 times.
[0059] 2) Clear the voltage and current sampling counter values in the zero-crossing interrupt and set the start sampling flag FLG.
[0060] 3) In the main process, the current and voltage values are sampled and converted once every Ts. After completing 10ms / Ts conversions, the peak value processing of voltage and current begins.
[0061] 4) The value in the middle position is the voltage peak point. In order to avoid the influence of interference, select the middle, left and right values, compare and take the median value as the peak value.
[0062] After a certain number of peak values are obtained continuously, filtering is performed to obtain the average value as the effective voltage peak value V.
[0063] 5) Considering that the current lags behind the voltage phase, 5 points are selected from the middle position and the second maximum value is taken as the peak value.
[0064] After a certain number of peak values are obtained continuously, filtering is performed to obtain the average value as the effective current peak value C.
[0065] 6) The product of the current peak and the voltage peak is P = V×C. P is not the actual power value, but it has a one-to-one correspondence with the actual power, so P can be used directly as a comparison value.
[0066] 7) After power-on, the pump will run for a while to complete the initial parameter values.
[0067] When the pressure is lower than the low pressure point set, the water pump starts. There are two situations:
[0068] A) If the pressure remains low, the pump will continue to run and the P value at this time will be recorded as P0.
[0069] B) If the pressure is higher than a certain value and the pressure is stable, the P value is compared. If the P value is also within the stable range and there is a certain difference between P and P0, it means that the user has closed the valve (faucet), and the water pump is stopped at this time.
[0070] The above embodiments are only illustrative of the principles and effects of the present application, and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application shall be included in the protection scope of the present application. The field, in particular, relates to an intelligent water pump control method.
[0071] At present, in the water pumps powered by induction motors, in the corresponding intelligent water pump applications, flow switches are usually used to detect whether the user is using water. When water flows, the water flow switch is activated, and the control board detects this action, which means that the user is using water. This flow switch generally uses a reed switch or a Hall device for contactless detection.
[0072] This control method has the following problems
[0073] 1. Due to sand and fiber in the water, the water flow switch may be stuck, thus failing to correctly reflect the water flow;
[0074] 2. Whether it is a reed switch or a Hall device, there are certain differences. In addition to the differences in structure and magnetic materials, it is difficult to ensure the consistency of mass production, and wrong judgments often occur in actual applications;
[0075] 3. When using magnets as detection components, magnets tend to absorb some impurities in the water, such as iron or other magnetic powders, which can cause detection failure;
[0076] 4. Cost is also something that needs to be considered. If the cost is high, it will be unfavorable for market promotion.
[0077] In view of the above-mentioned shortcomings (problems) of the prior art, in order to be able to perform new water flow detection and water pump control, the present application provides an intelligent water pump control method.
[0078] To achieve the above-mentioned purpose and other related purposes, the present application adopts the following technical solutions: an intelligent water pump control method, including a water pump body and a controller, the controller detects the operating current and operating voltage of the water pump body, and determines whether there is water flow according to the change of the water pump operating power. When the water pump operating power is stable, it is judged that there is no water flow; when the water pump operating power changes by exceeding the set power threshold, it is judged that there is water flow.
[0079] Optionally, the controller includes a zero-crossing detection circuit, which detects the zero-crossing point of the voltage of the water pump body, obtains the voltage peak point, and performs voltage sampling near the voltage peak point.
[0080] Optionally, the controller detects the current of the water pump body, obtains the current zero point in conjunction with the voltage zero point, and then obtains the current peak point, and performs current sampling near the current peak point.
[0081] Optionally, the controller detects the water pressure of the water pump body and collects water pressure data. When the controller determines that the water pressure data is higher than the water pressure threshold and the power of the water pump body is in a stable state, it determines that the user stops using water, and the controller controls the water pump to stop working.
[0082] Optionally, the controller controls the water pump body to run for a period of time, and determines whether there is a conversion mark. If yes, the controller starts voltage and current sampling conversion, records the conversion times plus one, and then determines whether the conversion times standard is met. If yes, the voltage peak value V and current peak value C are obtained, V×C is calculated, and then the water pressure data is stepped on and converted to calculate the current water pressure;
[0083] If there is no conversion mark, the water pressure sampling conversion is directly performed to calculate the current water pressure;
[0084] If the number of conversions does not meet the number standard, the water pressure sampling conversion is directly performed to calculate the current water pressure;
[0085] Then, first determine whether the water pressure is higher than the preset parameter and the water pressure is stable, and then determine whether the power is stable. If the water pressure is higher than the preset upper limit parameter and is stable, and the power is also stable, then turn off the water pump, convert the water pressure sampling, calculate the current water pressure, and then determine whether the water pressure is lower than the preset lower limit parameter. If the water pressure is lower than the preset lower limit parameter, start the water pump and return to the mark judgment step. If the pressure is higher than the preset lower limit parameter, then return to the step of turning off the water pump.
[0086] If the water pressure is low or unstable or the power is unstable, start the water pump.
[0087] Optionally, the controller further includes a zero-crossing terminal service step:
[0088] When the interrupt service is triggered, step 1: protect the scene; step 2: clear the voltage and current sampling counters; step 3: set the flag to start conversion; step 4: restore the scene and return to the main program.
[0089] Optionally, the controller includes a single-chip microcomputer module, a motor operation control module, a current detection module, a voltage detection module, a water pressure detection module, and a zero-crossing detection module. The motor operation control module, the current detection module, the voltage detection module, the water pressure detection module, and the zero-crossing detection module are respectively connected to the single-chip microcomputer module. The current detection module provides a current detection signal to the single-chip microcomputer module, the voltage detection module provides a voltage detection signal to the single-chip microcomputer module, and the water pressure detection module provides a water pressure detection signal to the single-chip microcomputer module; the zero-crossing detection module provides a voltage zero-crossing signal to the single-chip microcomputer module.
[0090] In summary, the present application includes at least one of the following beneficial technical effects:
[0091] 1. The circuit structure is simple and the method implementation cost is low, which can effectively improve the economic benefits and complete reliable water pump control under reasonable cost control;
[0092] 2. It does not rely on flow switches and does not use reed switches or Hall devices for contactless detection, thereby saving the cost of this component, avoiding component failure, improving work reliability, and reducing the subsequent maintenance cost of the flow switch. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 is a circuit schematic diagram of an embodiment of the present application;
[0094] Figure 2 This is the circuit diagram of the current detection module;
[0095] Figure 3 This is the circuit diagram of the voltage detection module;
[0096] Figure 4 This is the circuit diagram of the water pressure detection module;
[0097] Figure 5 This is the circuit diagram of the zero-crossing detection module;
[0098] Figure 6 It is the flow chart of water pump control operation;
[0099] Figure 7 It is the interrupt service routine flow chart.
[0100] Description of main reference numerals:
[0101] 1. Water pump body; 2. Controller; 21. Single chip microcomputer module; 22. Motor operation control module; 23. Current detection module; 24. Voltage detection module; 25. Water pressure detection module; 26. Zero crossing detection module. DETAILED DESCRIPTION
[0102] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0103] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The illustrations only show the components related to the present application rather than being drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.
[0104] The specific implementation of the present application is further described below in conjunction with the accompanying drawings.
[0105] The embodiment of the present application discloses an intelligent water pump control method, including a water pump body 1 and a controller 2. In an application scenario of the water pump body 1 and the controller 2, the controller 2 controls the water pump body 1, mainly to control the motor of the water pump body 1, and controls the power supply of the motor to control the operation and stop of the water pump body 1. In the water supply of buildings and houses, the water pump body 1 plays the role of boosting water supply to the water pipe (waterway). In daily life, when the high-rise faucet is turned on, water flows in the waterway. When the faucet is closed, no water flows in the waterway. In this solution, water flow sensors are not used, which eliminates a series of subsequent problems that may arise, such as water flow sensor components and installation and maintenance. However, in order to achieve the purpose of water flow detection.
[0106] This solution provides that the controller 2 detects the operating current and operating voltage of the water pump body 1 .
[0107] Whether there is water flow is determined based on changes in the operating power of the water pump (the power can be estimated by the operating current and voltage of the water pump body 1). When the operating power of the water pump is stable, it is determined that there is no water flow (no user is using water); when the operating power of the water pump changes beyond the set power threshold, it is determined that there is water flow (users are using water).
[0108] Combination Figure 1 , Figure 2 and Figure 3 , Figure 4 and Figure 5 The controller 2 includes a zero-crossing detection circuit, which detects the zero-crossing point of the voltage of the water pump body 1, obtains the voltage peak point, and performs voltage sampling near the voltage peak point.
[0109] The controller 2 detects the current of the water pump body 1, obtains the current zero-crossing point in conjunction with the voltage zero-crossing point, and then obtains the current peak point, and performs current sampling near the current peak point.
[0110] The controller 2 detects the water pressure of the water pump body 1 and collects water pressure data. When the controller 2 determines that the water pressure data is higher than the water pressure threshold and the power of the water pump body 1 is in a stable state, it determines that the user stops using water, and the controller 2 controls the water pump to stop working.
[0111] In a specific hardware example, the controller 2 includes a single-chip computer module 21, a motor operation control module 22, a current detection module 23, a voltage detection module 24, a water pressure detection module 25, and a zero-crossing detection module 26. The motor operation control module 22, the current detection module 23, the voltage detection module 24, the water pressure detection module 25, and the zero-crossing detection module 26 are respectively connected to the single-chip computer module 21. The current detection module 23 provides a current detection signal to the single-chip computer module 21, the voltage detection module 24 provides a voltage detection signal to the single-chip computer module 21, and the water pressure detection module 25 provides a water pressure detection signal to the single-chip computer module 21; the zero-crossing detection module 26 provides a voltage zero-crossing signal to the single-chip computer module 21.
[0112] The single-chip microcomputer module 21 has three analog-to-digital conversion function pins, ADC1, ADC2, and ADC3, which are used to sample and convert analog signals of current, voltage, and water pressure into digital signals for signal processing. The interrupt signal processing pin XINT is used to process zero-crossing signals. The output pin PB1 of the control water pump body 1 can output high and low levels. The single-chip microcomputer works normally after being connected to the working power supply Vcc and grounded.
[0113] The motor operation control module 22 includes a transistor N1, a relay K1, and a diode D6. The diode D6 is connected in parallel to the coil of the relay K1. The transistor N1 controls the normally open contact of the relay K1 according to the output of the single chip microcomputer, thereby controlling whether the water pump body 1 is enabled.
[0114] Among them, the current detection module 23 includes a current transformer A, resistors R1, R2, capacitor C1, diodes D1 and D2. The current transformer A is used to detect the working current of the water pump motor. Such a circuit is simple and reliable. The signal output by the current transformer is an AC signal. After the resistance-capacitance filtering, the negative half-wave signal is eliminated by D2, and the positive half-wave signal is directly sent to the ADC1 interface of the single-chip microcomputer. The current current value can be obtained through the ADC module. R2 is a sampling resistor. The current transformer generates a current signal that is converted into a voltage signal through R2. D1 is a clamping diode to prevent the signal from exceeding the allowable value of the single-chip microcomputer.
[0115] The voltage detection module 24 includes resistors R3, R4, R5, diodes D3, D4, and capacitor C2. The detection of the water pump motor voltage (live line, neutral line) is carried out by means of resistor voltage division. The voltage between the neutral line and the live line is divided by resistors R3 and R4, and the negative half-wave is removed by diode D4. Then, the signal is filtered by the resistor-capacitor filter circuit composed of R5 and C2. The signal is sent to the ADC2 interface of the single-chip microcomputer, and the current voltage value can be obtained through the ADC2 module of the single-chip microcomputer. D3 is a clamping diode to prevent the signal from exceeding the allowable value of the single-chip microcomputer.
[0116] The water pressure detection module 25 includes a pressure sensor (water pressure sensor), a capacitor C4 and a resistor R9, and directly sends the water pressure detection signal S3 to the ADC3 interface of the single chip microcomputer.
[0117] Finally, the zero-crossing detection module 26 includes resistors R6, R7, R8, capacitors C3, C4, diode D5 and transistor N1. The zero-crossing detection circuit uses N1 to generate a corresponding pulse signal, and the edge of the pulse is the zero-crossing point of the voltage. The positive half-wave of the voltage value of the zero and live wires is removed, N1 is turned on, and what R8 and C3 obtain after filtering is a low level, and the negative half-wave is eliminated by diode D5. At this time, transistor N1 is cut off, and what R8 and C3 obtain after filtering is a high level, and the edge from low to high and the edge from high to low are the zero-crossing points of the voltage signal. At this time, the zero-crossing detection signal S4 is provided to the interrupt function pin of the single-chip microcomputer.
[0118] Based on the above hardware structure, the control mode of the controller 2 is as follows: Figure 6 and Figure 7 understand:
[0119] The controller 2 controls the water pump body 1 to run for a period of time, and determines whether there is a conversion mark. If yes, the controller 2 starts the voltage and current sampling conversion, records the conversion times plus one, and then determines whether the conversion times standard is met. If yes, the voltage peak value V and current peak value C are obtained, V×C is calculated, and then the water pressure data is stepped on and converted to calculate the current water pressure;
[0120] If there is no conversion mark, the water pressure sampling conversion is directly performed to calculate the current water pressure;
[0121] If the number of conversions does not meet the number standard, the water pressure sampling conversion is directly performed to calculate the current water pressure;
[0122] Then, first determine whether the water pressure is higher than the preset parameter and the water pressure is stable, and then determine whether the power is stable. If the water pressure is higher than the preset upper limit parameter and is stable, and the power is also stable, then turn off the water pump, convert the water pressure sampling, calculate the current water pressure, and then determine whether the water pressure is lower than the preset lower limit parameter. If the water pressure is lower than the preset lower limit parameter, start the water pump and return to the mark judgment step. If the pressure is higher than the preset lower limit parameter, then return to the step of turning off the water pump.
[0123] If the water pressure is low or unstable or the power is unstable, start the water pump.
[0124] The controller 2 also includes a zero-crossing terminal service step:
[0125] When the interrupt service is triggered, step 1: protect the scene; step 2: clear the voltage and current sampling counters; step 3: set the flag to start conversion; step 4: restore the scene and return to the main program.
[0126] Further explanation is as follows:
[0127] 1) Sample and convert the voltage and current values every certain time Ts, so that 10ms / Ts values can be sampled within 10ms (Note: for 50HZ power supply, the time is 10ms, for 60HZ power supply, the time is 8.33ms). When to start sampling and conversion is set by the zero-crossing interrupt. Generally speaking, it is more convenient to process if the number of sampling and conversion times in 10ms is not less than 20 times.
[0128] 2) Clear the voltage and current sampling counter values in the zero-crossing interrupt and set the start sampling flag FLG.
[0129] 3) In the main process, the current and voltage values are sampled and converted once every Ts. After completing 10ms / Ts conversions, the peak value processing of voltage and current begins.
[0130] 4) The value in the middle position is the voltage peak point. In order to avoid the influence of interference, select the middle, left and right values, compare and take the median value as the peak value.
[0131] After a certain number of peak values are obtained continuously, filtering is performed to obtain the average value as the effective voltage peak value V.
[0132] 5) Considering that the current lags behind the voltage phase, 5 points are selected from the middle position and the second maximum value is taken as the peak value.
[0133] After a certain number of peak values are obtained continuously, filtering is performed to obtain the average value as the effective current peak value C.
[0134] 6) The product of the current peak and the voltage peak is P = V×C. P is not the actual power value, but it has a one-to-one correspondence with the actual power, so P can be used directly as a comparison value.
[0135] 7) After power-on, the pump will run for a while to complete the initial parameter values.
[0136] When the pressure is lower than the low pressure point set, the water pump starts. There are two situations:
[0137] A) If the pressure remains low, the pump will continue to run and the P value at this time will be recorded as P0.
[0138] B) If the pressure is higher than a certain value and the pressure is stable, the P value is compared. If the P value is also within the stable range and there is a certain difference between P and P0, it means that the user has closed the valve (faucet), and the water pump is stopped at this time.
[0139] The above embodiments are only illustrative of the principles and effects of the present application, and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, any equivalent changes made based on the structure, shape, and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A smart water pump control method, comprising a water pump body (1) and a controller (2), characterized in that: The controller (2) detects the operating current and operating voltage of the water pump body (1), and determines whether there is water flow according to the change of the water pump operating power. When the water pump operating power is stable, it is determined that there is no water flow; when the water pump operating power change exceeds a set power threshold, it is determined that there is water flow.
2. The intelligent water pump control method according to claim 1, characterized in that: The controller (2) comprises a zero-crossing detection circuit, which detects the zero-crossing point of the voltage of the water pump body (1) during operation, obtains the voltage peak point, and performs voltage sampling near the voltage peak point.
3. The intelligent water pump control method according to claim 2, characterized in that: The controller (2) detects the current of the water pump body (1), obtains the current zero-crossing point in conjunction with the voltage zero-crossing point, and then obtains the current peak point, and performs current sampling near the current peak point.
4. The intelligent water pump control method according to claim 3, characterized in that: The controller (2) detects the water pressure of the water pump body (1) and collects water pressure data. When the controller (2) determines that the water pressure data is higher than a water pressure threshold and the power of the water pump body (1) is in a stable state, it is determined that the user has stopped using water, and the controller (2) controls the water pump to stop working.
5. The intelligent water pump control method according to claim 1, characterized in that: The controller (2) controls the water pump body (1) to run for a period of time, and determines whether there is a conversion mark. If yes, the controller (2) starts voltage and current sampling conversion, records the conversion number plus one, and then determines whether the conversion number standard is met. If yes, the voltage peak value V and the current peak value C are obtained, V×C is calculated, and then the water pressure data is stepped on and converted to calculate the current water pressure; If there is no conversion mark, the water pressure sampling conversion is directly performed to calculate the current water pressure; If the number of conversions does not meet the number standard, the water pressure sampling conversion is directly performed to calculate the current water pressure; Then, first determine whether the water pressure is higher than the preset parameter and the water pressure is stable, and then determine whether the power is stable. If the water pressure is higher than the preset upper limit parameter and is stable, and the power is also stable, then turn off the water pump, convert the water pressure sampling, calculate the current water pressure, and then determine whether the water pressure is lower than the preset lower limit parameter. If the water pressure is lower than the preset lower limit parameter, start the water pump and return to the mark judgment step. If the pressure is higher than the preset lower limit parameter, then return to the step of turning off the water pump. If the water pressure is low or unstable or the power is unstable, start the water pump.
6. The intelligent water pump control method according to claim 5, characterized in that: The controller (2) further comprises a zero-crossing terminal service step: When the interrupt service is triggered, step 1: protect the scene; step 2: clear the voltage and current sampling counters; step 3: set the flag to start conversion; step 4: restore the scene and return to the main program.
7. The intelligent water pump control method according to claim 1, characterized in that: The controller (2) comprises a single-chip computer module (21), a motor operation control module (22), a current detection module (23), a voltage detection module (24), a water pressure detection module (25), and a zero-crossing detection module (26); the motor operation control module (22), the current detection module (23), the voltage detection module (24), the water pressure detection module (25), and the zero-crossing detection module (26) are respectively connected to the single-chip computer module (21); the current detection module (23) provides a current detection signal to the single-chip computer module (21); the voltage detection module (24) provides a voltage detection signal to the single-chip computer module (21); the water pressure detection module (25) provides a water pressure detection signal to the single-chip computer module (21); and the zero-crossing detection module (26) provides a voltage zero-crossing signal to the single-chip computer module (21).
Citation Information
Patent Citations
Water pump automatic control method
CN113107829A
Intelligent operation diagnosis platform for flood control and drainage water pump unit
CN113323858A