Application of 51 single chip microcomputer in boiler water treatment control

Publisher:InnovateMindLatest update time:2011-12-08 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Introduction
Natural water usually contains calcium and magnesium ions, commonly known as hard water. In boiler water, calcium and magnesium ions need to be removed to form soft water to prevent boiler scaling. Boiler water softening treatment is an important safety indicator in production, so the technical requirements for boiler water treatment are getting higher and higher. Single-chip microcomputers are widely used in the field of automatic control due to their high flexibility and stability. The boiler water treatment control device designed in this paper controls the water inlet valve switch by high and low water levels, uses a single-chip microcomputer as the core, and uses C language programming to realize cycle time circuit control. The device has been successfully used in Chengdu Fuhua Water Treatment Company.


1 Soft water production process and requirements for automatic control system
1.1 Production process
The working principle of softening water equipment is based on the principle of cation exchange. Water flows down from the exchange column and fully contacts the salt ions in the exchange resin to remove impurities and heavy metal cations that are easy to scale in the raw water. Its production process is roughly divided into the following steps: ① Operation after the conditions are met; ② Loose bed: mainly to fully flush the exchange resin compressed in the exchange column so that it can fully contact with the water to be treated; ③ Regeneration: After a period of water treatment, the salt ions in the exchanger resin will be lost, resulting in exchange failure. The exchange resin must be backwashed and then treated with acid (or alkaline) solution to restore its exchange capacity; ④ Replacement: During the replacement process, softened water flows from top to bottom through the exchange column to wash away the sodium ions in the resin and realize the exchange of sodium ions for calcium and magnesium ions; ⑤ Cleaning: Wash the residual chloride ions in the resin. In actual operation, there are two sets of completely identical structures A and B to form a system, with a total of four stations, each working in a different work process, alternating, and each station is replaced by a motor. When R(E) is in the regeneration and replacement process, E(R) should be in the exchange process to provide the required softened water for the boiler. The process flow chart is shown in 1 (1# is the water inlet valve, 3# is the regeneration valve).

[page]

1.2 Requirements of the process for the automatic system
The operating time length of each station is different according to the needs. The control system is required to be able to set, modify, and store the operating time length of each station, and automatically switch the work process according to the set time length of each station, and control the opening and closing of each valve. And it can manually intervene in the current station at any time to quickly enter the next station.
With the water level detector, the system should be able to automatically detect the water level of the softened water storage container. When the upper limit is reached, the system should be able to automatically stop running, and when the lower limit is reached, the system should be able to automatically start and restart. No matter how the water treatment is stopped, the set data cannot be lost, and the operating status before stopping should be saved, and the original state should be continued when it is restarted. The panel displays the current system status: shutdown or running; which of the four stations is running, the corresponding indicator light is on; the remaining time length of the current station, etc. The panel design is shown in Figure 2.


2 System Hardware Design
2.1 Selection of Single Chip Microcomputer
This control system adopts C8051F2xx series mixed signal system-level MCU chip, which is compatible with 8051 core, has 8 KB FLASH memory and hardware-implemented UART and SPI serial interfaces. VDD monitor, watchdog WDT and clock oscillator are also integrated in the chip. The chip is powerful, simplifies the hardware part and eliminates unnecessary peripheral chip design.
2.2 Display and key function design
According to the requirements, this system displays the column number, workstation number and minute content. These contents are all digital. Therefore, LED digital tubes can be used as displays. In order to simplify the display, the running time of each workstation is accurate to minutes, and the maximum time is set to hundreds. Therefore, three digital tubes are used to display the time. Another one is used to display the workstation number and column number, a total of four digits. When running, the current running column number and the remaining time of the current workstation are displayed; when setting, the current workstation number to be set and the set hours and minutes are displayed. The current running workstation time is displayed in countdown. In addition to the digital tube display, there are also 7 light-emitting diodes on the panel to indicate the current working status.
To set (modify) the running time of each station, the system needs to have buttons. This system has a total of 5 buttons. These buttons are organically combined to realize powerful functions such as position selection, shifting, setting time and position number, and resetting. During the setting period, the entire softening water system operates as usual. It’s just that the display temporarily does not display the current running station number and the remaining time, but instead displays the set value.
2.3 Time acquisition and storage of set values
​​The entire workflow of the system controls the rotation of each station according to the set time interval, which is provided by the internal clock as a reference time. The length of the station time set by the button can be saved and stored by the data storage. These functions are combined on a chip to reduce the number of chips, simplify the hardware design, and improve the anti-interference performance of the system.

[page]


3 System software design
3.1 Main program
The main program of the system software is written in basic C language. The software first initializes the hardware system, including port initialization, flag initialization, timer initialization, interrupt setting, etc. The detailed workflow of the main program is shown in Figure 3.


3.2 Interrupt service program -
clock minute update and key press are detected by timed scanning. In the interrupt service program, first access the clock time register area, read the minute update register, and determine whether there is a minute update. If there is, set the minute update flag for use by the main program. Then read the input interface value of the display driver and key control chip to the microcontroller to determine whether a key is pressed. When the port is low level, it means that a key is pressed, and high level means that no key is pressed.
The system integrates WDT timer reset to prevent software/hardware errors in the system. Once an error occurs, WDT overflows and the system alarms to ensure the normal operation of the system.
3.3 Control processing subroutine
The control processing subroutine is a program that directly controls the softening water equipment. When there is a minute update, the current running time is reduced by 1, and it is determined whether the remaining time of the current process is 0. If it is 0, it means that the current process running time has expired, the motor rotates and changes positions, and the process number increases by 1 until it reaches the last station, and then circulates to the first position and continues to run.
3.4 Key processing subroutine
Keys are used to input and control the operating parameters of the system. The key processing subroutine implements the key functions defined during hardware design. This system uses fewer keys, but the key functions implemented are relatively complete, including function keys, circular shift keys, increment keys, increment keys that automatically limit the input value range according to different contents, and reset keys to make the system run from the initial state. Some keys work alone, and some work together.


4 Conclusion
This paper designs a control system for softening water equipment. Compared with similar control systems, the single-chip system is minimized, the entire circuit structure is simple, the cost is low, and the system reliability is high. After actual operation, the system is stable and reliable.

Reference address:Application of 51 single chip microcomputer in boiler water treatment control

Previous article:Design of intelligent lighting control system based on 51 single chip microcomputer
Next article:Design of digital capacitance meter based on 51 single chip microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号