Design of intelligent water supply controller

Publisher:yanfeng00Latest update time:2011-05-10 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
O Introduction
With the rapid development of economy and the continuous emergence of high-rise buildings in cities, people's requirements for water supply quality and reliability of water supply systems are constantly increasing. In addition, the current energy shortage requires energy conservation. Therefore, it has become an inevitable trend to use advanced electronic measurement and control technology and automation control technology to design high-performance, high-reliability, low-cost, low-energy consumption, and constant-pressure water supply systems that can be applied to different fields. With the rapid progress of variable frequency speed regulation technology in recent years, variable frequency constant pressure water supply has also slowly developed on its basis and has become an emerging modern water supply technology.
At present, the design of foreign constant pressure water supply projects adopts the method of one frequency converter with only one water pump unit, and there is almost no situation of using one frequency converter to drive multiple water pump units. This method not only has a high investment cost, but also has a single function.
For this reason, a single-chip microcomputer system based on C8051F410 is designed to be added to the variable frequency speed regulation control system to form a more powerful composite control system. It not only overcomes the above shortcomings, but also has the advantages of convenient installation and debugging, comprehensive functions, high reliability. Strong anti-interference ability, etc., and can be widely used in various fields of industrial production and social life.

1 Control Principle
In the constant pressure water supply system, the remote pressure gauge installed in the pipe network provides a water pressure signal, which is transmitted to the central controller of the system through photoelectric isolation and voltage conversion circuit. The controller compares the collected pressure data with the preset pressure to obtain the deviation value, and then obtains the control parameter after PID operation. The D/A module converts the control parameter into an analog voltage output and adjusts the output frequency of the inverter to control the speed of the water pump to ensure that the pipe network pressure is basically constant. When the water consumption increases, the pipe network pressure is lower than the preset value, the inverter frequency will increase, the water pump speed will increase, and the pipeline water pressure will increase. However, if the rated output power of the water pump still cannot meet the user's water supply requirements, the pump will automatically switch to the power frequency operation state and start the next water pump with frequency conversion; on the contrary, when the water consumption decreases, the water pump operation frequency is reduced to the set lower limit operation frequency. If the water supply is still greater than the water consumption, the pump will be reduced until all pumps stop working. After a certain delay, the controller will re-compare the pressure and calculate the control output to maintain constant pressure water supply. Its system principle block diagram is shown in Figure 1.


The system can control two water pumps at the same time, and different operation modes can be adopted according to different occasions, such as single pump operation, one use and one supplement, one work and one change, timed pump change, etc.

2 System Overall Plan
The hardware and software of the system adopt modular and standardized design, and fully consider the expansion capacity of the system. The controller consists of three parts: the main control board, the display button panel and the power board. Figure 2 is the structural block diagram of the controller. Its working principle is: first, the user sets the preset pressure and various functional parameters of the controller operation through the display button panel, and saves them to the E2PROM memory for power-off storage. The voltage or current signal output by the remote pressure gauge at the user's pipe network end is converted into a digital quantity through the sampling circuit, sent to the single-chip microcomputer for comparison with the preset pressure, and the analog control quantity and relay output state quantity are calculated and output. Among them, the analog control quantity output is sent to the inverter through the inverter control module circuit to control the output frequency of the inverter; the relay output state quantity is sent to the relay group through the relay output circuit to control each pump to work in the power frequency or variable frequency state. Finally, the microcontroller sends the actual pressure value, preset pressure value, output frequency and the working status of each pump to the display panel for users to observe and operate.



3 System unit circuit
3.1 Selection of main controller

The main controller uses the single-chip microcomputer C8051F410, which is a fully integrated mixed-signal system-on-chip chip. It also integrates a 12-bit high-speed ADC module and a current output DAC module. At the same time, the hardware-implemented SMBus and UART serial interfaces can facilitate the communication between the processor and the E2PROM and the serial output of data. C2805lF410 also supports JTAG real-time simulation and tracking, and can perform non-invasive (without occupying on-chip resources) full-speed in-system debugging.
3.2 System power supply circuit
This design uses a high-precision switching voltage regulator circuit based on the three-terminal voltage regulator chip TOP221Y. The main circuit topology uses a single-ended flyback DC conversion circuit, and its output uses two sets of DC low-voltage power supplies: the main circuit provides a 5 V DC power supply for the digital circuit part of the system, and the secondary circuit provides a 15 V DC power supply for the analog part of the system.
3.3 Pressure gauge signal acquisition and photoelectric isolation circuit
The pressure signal monitored by the pressure sensor located in the user's pipe network is filtered and isolated by the photoelectric isolation circuit, and then enters the ADC module inside the C8051F-410 to achieve proportional conversion and convert it into a 12-bit digital quantity for the microcontroller to process and calculate its signal. In order to ensure that the input quantity is commensurate with the conversion range and give full play to the resolution of the A/D converter, the external 0~5 V analog voltage is converted into a 0~2 V analog voltage signal when passing through the photoelectric isolation circuit before the A/D conversion of the pressure signal. The circuit principle is shown in Figure 3.


As shown in Figure 3, the external voltage signal is connected from the IN port, and after isolation and filtering circuits, it is converted into 0~2 V voltage and sent to the single-chip microcomputer from the ADC port. At the same time, in the process of analog signal acquisition to the single-chip microcomputer system, various interference signals will enter the MCU control system along with the measured signal. These signals superimposed on the useful measured signal will reduce the accuracy of the measurement and cause instability in the control system. The above circuit design uses linear optocouplers to perform mutual conversion between photoelectricity and light as a medium for signal transmission, which completely isolates the measurement system from the field signal electrically, thereby achieving linear level conversion and not introducing electrical noise interference from the field into the control system.
3.4 Control inverter output circuit
The single-chip microcomputer converts the calculated digital quantity into an analog voltage output through the internal current output type digital/analog conversion module (IDAC). The output voltage is filtered and proportionally converted to control the frequency of the inverter. At the same time, in order to ensure that the output voltage of the single-chip microcomputer IDAC is stable and reliable and not interfered with, the external circuit also uses an optoelectronic isolation circuit. Its circuit schematic diagram is shown in Figure 4.

3.5 External E2PROM memory circuit
This design uses Atmel's E2PROM chip AT24C02, which is small in size, excellent in performance, flexible and convenient to use. It can store some user settings and operating status parameters after the system power is off, so that it can be read after restarting the machine. The SMBus integrated in the processor itself is compatible with the I2C interface and can communicate directly with AT24C02. This solution is not only simple in design, reliable in operation, but also low in cost. The circuit principle is shown in Figure 5.


3.6 Relay control output circuit
The main controller drives 5 sensitive relays K1~K5 to control 1 drain valve and 2 pump motors respectively, realizing the opening and closing control of the drain valve and the switching of the variable frequency or power frequency state of the pump. The single-chip microcomputer outputs the relay state control signal to the serial shift register chip 74HC595D through the signal lines RX and TX. The 74HC595D latches the output state hardware to prevent the output state from being disturbed. Finally, the Darlington tube ULN2003 is used to improve the driving ability to control the working state of the pump motor and the action of the drain valve.

4 Software design of the controller
The PID control algorithm is used to adjust the output frequency of the inverter in this design. The control algorithm is the proportion, integration and differentiation of the deviation. It is a mature and widely used algorithm in continuous systems, especially in industrial control, because the precise mathematical model of the control object is difficult to establish and the system parameters often change. Therefore, the PID control algorithm is often used. Its control schematic diagram is shown in Figure 6.


Its mathematical expression is:

Where: KP, KI and KD are proportional coefficient, integral coefficient and differential coefficient respectively; e(t) is the error.
After discretization, formula (1) can be easily implemented by computer. The mathematical expression of its position PID control law is:

Where: e(j) is the error value of the jth sampling; T is the sampling period.
In practical applications, the incremental PID control law is generally selected. Because compared with the position algorithm, the incremental algorithm does not need to be accumulated, it is not easy to produce a large cumulative error, and the result is the increment of the control amount. The impact of false action is relatively small, and it is easier to achieve shock-free switching from manual to automatic. The incremental digital PID control formula is:

In this design, the actuator uses a frequency converter. Since the incremental digital PID control algorithm is used, for each sampling period, the control amount output by the controller is relative to the increase of the previous time. The system control algorithm flow is shown in Figure 7.


Figure 7 shows the control flow of the incremental digital PID algorithm in the whole system. Each time the A/D timing acquisition interrupt is entered, the pressure signal will be converted into a digital quantity. The PID control module will process the digital quantity of the pressure signal through the algorithm to obtain the corresponding control output digital quantity, and then start the D/A to convert the digital output into an analog voltage output, and its analog voltage output is used to control the inverter. This module cooperates with the relay switch output module and the pressure acquisition module to achieve real-time measurement and control through the corresponding control strategy to maintain the dynamic balance of the water supply network pressure. In order to facilitate on-site debugging, the set values ​​of the rise, fall and tracking sampling cycle of the PID adjustment are made variable in the design. The values ​​can be changed through the keyboard when the machine is turned on, thereby changing the PID parameters to meet the control needs of different occasions. As shown in Figure 8, curve 1 is the response curve of the motor module control voltage changing with time before the parameter adjustment; curve 2 is the response curve after the parameters have been adjusted many times. It can be seen that after the parameter adjustment, the response performance of the system has been greatly improved, so in the actual application environment, the set value needs to be adjusted many times to ensure the best control performance.



5 Conclusion
The software and hardware design of the intelligent water supply controller is analyzed. The controller is based on the SoC microcontroller C8051F410, which realizes the collection of pipe network pressure and the control of inverter output, and has a unique and flexible user interface. The controller not only has high sampling and control accuracy, but also has multiple protection and anti-interference functions to ensure the stability and safety of the controller. The constant pressure water supply system composed of the controller and the inverter not only greatly improves the water supply quality, but also has a significant energy-saving and consumption-reducing effect. It has important practical significance in the current national energy shortage situation.

Reference address:Design of intelligent water supply controller

Previous article:PLC-based DC servo system for industrial robot joints
Next article:Design of PLC Automation System for Subway Substation

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号