The principle of variable frequency speed regulation constant pressure water supply and the hardware composition and software design method of variable frequency speed regulation constant pressure water supply control system composed of AT89C51 are discussed.
1 Working Principle
Compared with water supply from water towers or high-level water tanks on rooftops, variable frequency speed regulation constant pressure water supply has the advantages of low investment, energy conservation, and less chance of secondary pollution of water quality. More and more cities and residential areas have or are planning to adopt variable frequency speed regulation constant pressure water supply. The composition of variable frequency speed regulation constant pressure water supply system is shown in Figure 1.
Its working principle is: 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 inverter. The inverter adjusts the power supply voltage and frequency of the water pump motor according to the input signal of the controller.
When the water consumption increases, the controller controls the inverter to increase the voltage and frequency of the motor, increase the speed of the water pump, and increase the water output; when the water consumption decreases, the controller controls the inverter to reduce the voltage and frequency of the motor, reduce the speed of the water pump, and reduce the water output. Through this control method, the pressure of the tap water pipeline can be kept at the set value.
Due to the high price of frequency converters, variable frequency speed regulation constant pressure water supply systems usually use multiple water pumps in parallel operation, and several water pumps share one frequency converter. When working, the controller controls the power distribution system to automatically select the number of water pumps required to be put into operation according to the amount of water consumption. The general method is to keep one of the water pumps under the control of the frequency converter, and the other water pumps run at full speed or stop and wait at the working frequency according to the change of water supply.
2. Single chip microcomputer controller design
2.1 Hardware Design
The principle wiring diagram of the single-chip microcomputer controller and the variable frequency speed regulation constant pressure water supply system is shown in Figure 2. The system uses Atmel's AT89C51 single-chip microcomputer as the control CPU (because the single-chip microcomputer has 4KB of Flash Memory); to ensure the stable and reliable operation of the system, MAX813 is used as the system voltage monitoring and Watchdog circuit; the 4-20mA pressure signal sent by the pressure transmitter is converted into a 0-5V voltage signal by IC7; the A/D conversion circuit ADC0809 converts the water pressure value detected by the pressure sensor and the setting value of the setting potentiometer into digital quantities for use by the single-chip microcomputer; the D/A conversion circuit uses DAC0832 to convert the control quantity input by the single-chip microcomputer into a 4-20mA current loop to control the output frequency of the inverter. The control signals from the single-chip microcomputer to the power distribution part and some control switch commands of the system are isolated through the photoelectric coupling circuit to reduce the impact of the strong electric circuit on the single-chip microcomputer.
2.2 Software Design
Assume that there are two water pumps in the water supply system, of which water pump 1 is variable frequency operation and water pump 2 is industrial frequency operation. They are started or stopped by contactors respectively, and the microcontroller controls the operation of the contactors through relays. The software design is as follows:
2.2.1 MCU interface address allocation and control port function
A/D converter ADC0809: 80XXH~87XXH; the pressure sensor is IN0 channel, and the setting potentiometer is IN1 channel.
D/A converter DAC0832: 08XXH.
Water pump 1 relay controls P1.0: when P1.0=0, water pump 1 starts; when P1.0=1, water pump 1 stops.
Water pump 2 relay controls P1.1: when P1.1=0, water pump 2 starts; when P1.1=1, water pump 2 stops.
Power-on command P1.2: When P1.2=0, the system starts working, and when P1.2=1, the system stops working.
2.2.2 Software Programming
The single chip controller software of the variable frequency speed regulation constant pressure water supply system includes the main program, control quantity calculation subroutine, relay control subroutine, A/D conversion subroutine, delay subroutine, etc. [page]
The main program includes system initialization, detection of power-on commands, etc. The main program block diagram is shown in Figure 3.
The T1 interrupt service program includes the management and application of all subroutines except the main program. The program flow chart is shown in Figure 4.
The A/D conversion uses a timed conversion method. After starting the A/D, a software delay of 150μs is used before the conversion result is read out.
The relay control subroutine completes the operation and stop control of water pump 2. Since the control amount of the frequency converter is directly related to the operating speed of water pump 1, the program can judge the working status of water pump 1 according to the size of the control amount of the frequency converter. If the control amount is zero, it means that the system pressure is too high and water pump 1 has been adjusted to the lowest speed. At this time, water pump 2 needs to stop working; if the control amount is the maximum value, it means that the system pressure is too low and water pump 1 has been adjusted to the highest speed. At this time, water pump 2 needs to be put into operation. Due to the large inertia of the change of pressure in the water supply system, when the control amount reaches the maximum or minimum value, it is necessary to delay for a period of time. After repeated measurements during the delay stage, if the control amount remains unchanged, it will be switched. When the system has more than 2 water pumps, the switching principle is the same, but a cyclic judgment program for judging the start and stop status of multiple water pumps needs to be added.
The relay control subroutine block diagram is shown in Figure 5.
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 control quantity calculation subroutine flowchart is shown in Figure 6.
3 Conclusion
Variable frequency speed regulation constant pressure water supply is the development direction of water supply in modern cities and residential areas. The variable frequency water supply system controlled by a single-chip microcomputer has the characteristics of reliable operation, easy implementation, and low price, and is an ideal controller.
Previous article:A must-read for beginners: some difficult-to-grasp concepts for 51 single-chip microcomputers
Next article:Introduction to AT89C51 Microcontroller
Recommended ReadingLatest update time:2024-11-16 19:42
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Shanghai Hangxin ACM32F070 development board evaluation] 5. Run the watchdog
- The rules for adding core points have been adjusted, and new products have been added to the core redemption mall!
- How does a magnetostrictive sensor work? What is the working principle of a magnetostrictive sensor?
- What types of posts can become featured posts?
- Several important parameters of RF switches
- MAX6675 temperature instability
- The pitfalls of first contact with sensortile.box
- UA level constant current source output chip
- Issues with changing MAC when batch flashing blueNRG-1 with BlueNRG-X Flasher Utility
- EEWORLD University Hall ---- Lao Wu's MCU Practice_NO.1 Project Practice