43- Design of Ultrasonic Liquid Level Controller Based on 51 Single Chip Microcomputer

Specific realization function

 

The system consists of AT89C52 single-chip microcomputer + HC-SR04 ultrasonic ranging module + LCD1602 LCD screen + relay + LED indicator and buzzer alarm module + button module + power supply.

Specific functions:

1. Measured by the HC-SR04 ultrasonic distance measuring module and LCD1602 displays the liquid level;

2. The liquid level range can be set by pressing the button;

3. When the water level is higher than the upper limit of the water level, the high water level alarms, and the relay controls the water pump to stop adding water;

4. When the water level is lower than the lower limit of the water level, the low water level alarms, and the single-chip microcomputer controls the water pump to start adding water.

The LCD display has 4 letters:

H------The highest water level setting value of the container

L------The minimum water level setting value of the container

D-----The actual height of the container (can be set)

C-----The height of the liquid in the container

Buttons: set button, increase button, decrease button, reset button

Indicator light: red ---- exceed the set maximum water level H  

Yellow ----- lower than the set minimum water level L

Green-midway between highest H and lowest L

design background

Large water tanks are an indispensable part in the production process of many companies. Its performance and work quality not only have a huge impact on production, but also related to production safety. In the past, a large number of operations on the water tank were performed by the corresponding personnel. This manual method has brought great disadvantages, such as water level control, monitoring the environment of the water tank at all times, monitoring at night, etc., the operator is slightly Negligence, or damage to simple monitoring devices, will bring irreparable losses, and even more serious threats to the personal safety of production personnel. Therefore, for water tank control, if you can use a sophisticated automation system that will run in strict accordance with the production regulations, you can avoid the probability of accidents to the greatest extent, while also saving resources and effectively improving the efficiency of production.

In terms of water resources conservation, in many cases, manual control in the past caused unnecessary waste of resources. Most of the reason was that the water level inside the water tank did not provide timely feedback information to the operator, which caused a certain delay in the control. Too much water or fail to replenish water in time, resulting in waste of resources or abnormal production. The monitoring of the water tank level and the introduction of automation can greatly improve the situation of excessive water replenishment and timely replenishment, which can save resources and effectively reduce costs.

The single-chip microcomputer, a small chip integrates the various components of a microcomputer, and its birth enables many automatic control systems to be realized. 80C51 has powerful functions, simple design, cheap manufacturing, and supports more instruction sets. So it is applied to the development of many embedded systems.

In summary, it can be seen that the research on the design of the water tank level detection system for this subject has important significance.

hardware design

Ultrasonic water level sensor is a new type of water level measuring instrument that uses the principle of air acoustic echo ranging to measure water level changes. A sound pulse is emitted by the transceiver shared transducer, and the sound is transmitted through the sound tube to produce reflection on the water interface, and the echo is received by the same transducer. The propagation time of the sound wave in the air and the on-site sound velocity are measured, and the distance from the launching surface of the transducer to the water surface is calculated, and the water level value is obtained according to the installation datum surface of the transducer and the zero point of the water level. It is characterized by non-contact measurement, no need to build water level logging, easy installation, automatic measurement; with sound velocity compensation; RS-485 data output.

software design

The main program mainly completes the initialization and coordination of subroutine calls. First, complete the initialization of the storage system of the single-chip microcomputer, and then start to transmit the ultrasonic wave and start the timer. After the receiving circuit receives the ultrasonic signal, an internal interrupt of the single-chip microcomputer is triggered. After the timing is over, the main program starts to process the data, and finally makes corresponding actions.

Schematic diagram

The system schematic design adopts Altium Designer19, as shown in the figure.

program

This design uses KEIL5 software to realize the program design, as shown in the figure.

Simulation implementation

This design uses protues8.7 software to realize the simulation design, as shown in the figure.

All information

All materials include programs (notes), AD schematics, PCB source files, protues simulation, reference papers, program explanations, simulation explanations, simulation videos, schematic explanations, introductions to the use of materials, etc., the most complete network!

For information, please follow the WeChat public account "Electronic Engineer Growth Diary", and reply the key word: "Information"!

Guess you like

Origin blog.csdn.net/weixin_41017942/article/details/115187284