Design of strong magnetic water treatment instrument

Publisher:RadiantRiverLatest update time:2011-08-28 Source: 山西电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Abstract: The system is controlled by a single-chip microcomputer and consists of a keyboard circuit, an A/D converter, a single-chip microcomputer, a liquid crystal display, a time circuit and a drive circuit. According to the system requirements, the keyboard interface, the time circuit interface, the liquid crystal display circuit interface, the single-chip microcomputer selection, the A/D converter interface and the drive circuit design are introduced in detail, and the working principle of the circuit is explained.
Keywords: single-chip microcomputer; liquid crystal display; time circuit; A/D converter

0 Introduction
The strong magnetic water treatment instrument is developed by absorbing the advantages of similar products at home and abroad. The product has a strong central magnetic field, small external magnetic interference, and obvious water treatment effect. It is a new generation of the most ideal water treatment product with novel and unique structure for anti-scaling, descaling, sterilization, algae removal, anti-corrosion and anti-rust. It can be widely used in central air-conditioning water circulation systems, heat exchange systems, industrial cooling water systems, heating and water supply pipelines for homes and public buildings, circulating cooling systems, and water quality stability in special aquaculture farms.

1 Control requirements for strong magnetic water treatment instrument
(1) Collect two analog signals: 1 temperature, (NTC resistance signal) 1 pressure difference (or two pressures, 0~10 V or 4~20 MA signal).
(2) There are four output control points: 4 switch outputs (relays, two switches in a group).
(3) Control requirements: Compare the measured pressure difference with the set pressure difference. When it exceeds the set pressure difference, close switch 1 and open switch 2 at the same time. Delay 30 seconds, open switch 1 and close switch 2; repeat this process. The system has a real-time clock.
(4) Display requirements: LCD text display, display measured temperature, pressure difference, set pressure difference, display the status of the two groups of switches respectively, and display the real-time clock.
(5) Design a keyboard: set the initial values ​​of temperature, pressure, date and time, etc.

2 System design
2.1 System block diagram
According to the system requirements, the hardware system shown in Figure 1 is designed. The system consists of 10 parts. The functions of each part are as follows:

a.jpg


2.1.1 Keyboard circuit
Set various parameters of the system and control the system.
2.1.2 Time circuit
Generate the date and time of the system, such as year, month, day, hour, minute, second, and store these parameters.
2.1.3 Single chip microcomputer
Is the core of the system, and is used to manage and control various parts of the system.
2.1.4 Power supply circuit
Transforms and stabilizes the 220 V AC voltage. Generates various voltages required by the system.
2.1.5 Display circuit
Used to display the working status of the system, such as temperature, pressure, date and time.
2.1.6 A/D conversion circuit
Converts the analog voltage detected by the temperature and pressure sensors into digital quantities and inputs them into the single chip microcomputer.
2.1.7 Temperature sensor
Converts the change of the test point temperature into an analog voltage and sends it to the A/D converter.
2.1.8 Pressure sensor
Converts the change of the test point pressure into an analog voltage and sends it to the A/D converter.
2.1.9 Driving circuit
The control signal output by the single-chip microcomputer is converted into a driving signal with the power required by the actuator and sent to the actuator.
2.1.10 Actuator
Under the action of the driving signal, the final task is executed.

2.2 System Circuit Design
According to the system requirements and system block diagram 1, the detailed circuit design is carried out. The selection of each circuit chip and circuit design are introduced below. The circuit schematic diagram is shown in Figure 2.

b.jpg


2.2.1 Keyboard circuit design
The function of this part is to set various parameters of the system and control the system. Parameter setting mainly includes setting the values ​​of temperature and pressure, and the other is setting the date and time. Control mainly includes starting, stopping and selecting various parameters. Since the system requires few functions, a total of 8 keys are set. These 8 keys are connected to P20~P27 of the microcontroller. Since the pins of the microcontroller are currently sufficient, the simplest connection method is adopted.
2.2.2 Time circuit
The system requires the display of date and time. Although the microcontroller can generate the date and time of the system, once the system is shut down, the date and time will not be counted, so the time circuit DS1302 is selected. This circuit can automatically count the date and time, such as generating year, month, day, hour, minute, and second, and store these parameters. When the date and time need to be displayed, the microcontroller reads directly from DS1302 and sends it to the LCD after processing.
2.2.3 Selection of single-chip microcomputer
The single-chip microcomputer is the core part of the system, which is used to manage and control various parts of the system. According to the system requirements, AT89C52 was selected. AT89C52 has 4 8-bit parallel ports, 8 kB flash memory, etc., which can fully meet the system requirements. The connection between the single-chip microcomputer and other parts is all direct connection, which can make the system have the advantages of simple structure, few devices, and low cost.
2.2.4 Power supply circuit design
The power supply circuit uses a transformer to transform the 220 V AC into 10 V, which is rectified and filtered by a rectifier for use by the relay, and then stabilized by a three-terminal voltage regulator to generate +5 V for use by the single-chip microcomputer and other circuits that require +5 V. The other way of +5 V is to charge the rechargeable battery for use by DS1302.
2.2.5 Display circuit design
Since the system requires the display of Chinese characters, the number of lines is 4. Therefore, we chose the OCMJ4XSC-8 dot matrix LCD screen, which has display RAM, font generator, built-in 2M-bit Chinese font ROM, providing a total of 8192 Chinese fonts (16×16 dot matrix), 16 k-bit half-width font ROM, providing a total of 126 (16×8 dot matrix), the dot matrix number is 128×64, and can display 4 lines, 8 Chinese characters per line. The microcontroller transmits information to OCMJ4XSC-8 through the P0 port, and uses the corresponding bit of the P1 port to transmit the control signal. We use this display screen to display the working status of the system, such as setting temperature, pressure, measuring temperature and pressure, date and time, etc.
2.2.6 A/D conversion circuit design
It is required to convert two analog voltages and convert the analog voltage detected by the temperature and pressure sensors into digital quantities and input them into the microcontroller. Here, the 8-way analog-to-digital converter ADC08 09 is selected. The circuit inputs data through the P0 port and controls it through P15, P16 and P17.
2.2.7 Temperature sensor selection
Test the water temperature in the container, convert the water temperature at the test point into a 0-5 V voltage and send it to the A/D converter. For the single-chip microcomputer to analyze and judge, when the water temperature is lower than the minimum setting value, start the heating circuit to heat the container, and when the water temperature is higher than the maximum setting value, stop the heating circuit.
2.2.8 Pressure sensor selection
Test the water pressure in the container, convert the water pressure at the test point into a 0-5 V voltage and send it to the A/D converter. For the single-chip microcomputer to analyze and judge, when the water level is lower than the minimum setting value, start the water supply circuit to add water to the container, and when the water level is higher than the maximum setting value, stop the water supply. 2.2.9
Drive circuit design
The function of the drive circuit is to convert the control signal output by the single-chip microcomputer into a drive signal of the power required by the actuator and send it to the actuator. Since the controlled object requires 220 V AC, discrete components and relay circuits are used. The four outputs of P33, P34, P35 and P36 of the single-chip microcomputer are driven by the transistor to make the relay close and connect 220 V to power the actuator.
2.2.10 Actuator
This part of the circuit diagram is not drawn in the figure. The single-chip microcomputer converts the TTL level into 220 V AC voltage through the drive circuit and sends it to the corresponding actuator, such as the solenoid valve for adding water, the electric heating pipe for heating, etc., to complete the execution of the final task.

3 Conclusion
The above circuit is designed according to the user's requirements. This circuit uses a more advanced single-chip microcomputer, a dot matrix liquid crystal display and a time circuit, etc., and the circuit structure is simple. After assembly, debugging and operation, the circuit works stably and reliably, which fully meets the design requirements.

Reference address:Design of strong magnetic water treatment instrument

Previous article:Design of large capacity data acquisition system based on AVR microcontroller
Next article:Human-computer interaction design of intelligent power distribution monitoring system

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号