Compared with water towers or elevated water tanks on rooftops, variable frequency speed control constant pressure water supply has advantages such as lower investment, energy saving, and less chance of secondary water pollution. More and more cities and residential communities have adopted or are planning to adopt variable frequency speed control constant pressure water supply.
The working principle of the variable frequency speed control constant pressure water supply system is as follows: the controller detects the actual water pressure value, compares the difference between the set water pressure value and the actual water pressure value, calculates according to the PID control law, and outputs a control signal to the frequency converter. The frequency converter then adjusts the power supply voltage and frequency of the water pump motor according to the input signal of the controller.
When water consumption increases, the controller controls the frequency converter to increase the voltage and frequency of the motor, thereby increasing the pump speed and water output. Conversely, when water consumption decreases, the controller controls the frequency converter to decrease the voltage and frequency of the motor, thereby decreasing the pump speed and water output. This control method maintains the water pressure in the pipes at the set value.
Due to the high price of frequency converters, variable frequency speed control constant pressure water supply systems typically employ multiple water pumps operating in parallel, with several pumps sharing a single frequency converter. During operation, the controller automatically selects the required number of pumps to operate based on the water consumption. Generally, one pump is kept under the control of the frequency converter, while the other pumps operate at full speed at the mains frequency or remain on standby, depending on changes in water supply.
2. Design of a single-chip microcontroller for a variable frequency speed control constant pressure water supply system
2.1 Hardware Design
Figure 2 shows the schematic diagram of the microcontroller controller and the variable frequency speed control constant pressure water supply system. The system uses the Atmel AT89C51 microcontroller as the control CPU (because this microcontroller has 4KB of on-chip Flash Memory). To ensure stable and reliable system operation, the MAX813 is used for voltage monitoring and the watchdog circuit. The 4-20mA pressure signal from the pressure transmitter is converted into a 0-5V voltage signal by IC7. The A/D conversion circuit ADC0809 converts the detected water pressure value from the pressure sensor and the set value from the setting potentiometer into digital values for the microcontroller. The D/A conversion circuit uses DAC0832 to convert the control input from the microcontroller into a 4-20mA current loop to control the output frequency of the frequency converter. Control signals from the microcontroller to the power distribution section and some control switch commands of the system are isolated through optocoupler circuits to reduce the influence of high-voltage circuits on the microcontroller.
2.2 Software Design
Assume the water supply system has two water pumps, where pump 1 operates at a variable frequency and pump 2 operates at a fixed frequency. They are started and stopped by contactors, and the microcontroller controls the contactors' operation via relays. The software design is as follows:
2.2.1 Microcontroller Interface Address Allocation and Control Port Functions
A/D converter ADC0809: 80XXH~87XXH; pressure sensor is on channel IN0, setting potentiometer is on channel IN1.
D/A converter DAC0832:08XXH.
Water pump 1 is controlled by relay P1.0: when P1.0=0, water pump 1 is turned on; when P1.0=1, water pump 1 is turned off.
Water pump 2 is controlled by relay P1.1: when P1.1=0, water pump 2 is turned on; when P1.1=1, water pump 2 is turned off.
Power-on command P1.2: When P1.2=0, the system starts working; when P1.2=1, the system stops working.
2.2.2 Software Programming
The microcontroller software for the variable frequency speed control constant pressure water supply system includes a main program, control quantity calculation subroutines, relay control subroutines, A/D conversion subroutines, and delay subroutines. The relay control subroutine controls the operation and stop of water pump 2. Since the control quantity of the frequency converter is directly related to the operating speed of water pump 1, the program can determine the operating status of water pump 1 based on the magnitude of the control quantity. If the control quantity is zero, it indicates that the system pressure is too high, and water pump 1 has been adjusted to the minimum speed, at which point water pump 2 needs to be stopped. If the control quantity is at its maximum value, it indicates that the system pressure is too low, and water pump 1 has been adjusted to the maximum speed, at which point water pump 2 needs to be started. Due to the large inertia of pressure changes in the water supply system, a delay is required after the control quantity reaches its maximum or minimum value. During the delay period, repeated measurements are performed. If the control quantity remains unchanged, then switching is initiated. When the system has more than two water pumps, the switching principle is the same, but a loop judgment program to determine the on/off status of multiple water pumps needs to be added.
The control quantity calculation subroutine includes the calculation of the inverter control quantity and the output of the control quantity, wherein the control law adopts the PID regulation law.
The flowchart of the control quantity calculation subroutine is shown in Figure 6.
3. Conclusion
Variable frequency speed regulation constant pressure water supply system is the development direction of water supply in modern cities and residential communities. The variable frequency water supply system controlled by single-chip microcomputer has the characteristics of reliable operation, easy implementation and low price, and is a more ideal controller.