aytwartoofyoroo

【Course Design】Liquid Level Control System

 
Overview

Topic requirements
(1) Conduct overall research and design of liquid level monitoring and control.
(2) Use a submersible liquid level sensor to measure the liquid level.
(3) By collecting data on the liquid level, accurately determine whether the current value is within the set range. If it is greater than the set maximum value, the water pump starts working until the liquid level reaches the maximum value, then the water pump stops working. If the liquid level is less than the minimum value, the buzzer alarms.
(4) Use the LCD1602 display to display the current liquid level in real time.
Topic Analysis
!!!!!!!!! Attention!!!!!!!!!
This design uses TLC1543 instead of AD0809 in the figure below.
Schematic diagram Design instructions
1. Power supply circuit design:
In this system, the water injection pump, water discharge pump and liquid level sensor require DC12V power supply, while the working voltage of the microcontroller and other peripheral circuits is DC 5V. LM2596 is a 150KHz fixed frequency PWM DC-DC regulated power converter. It has 3A output current driving capability, high efficiency, low ripple, high linear regulation rate and load regulation rate. In this design, the power supply scheme adopts 12V voltage input, and 12V voltage provides power to the water injection pump, water discharge pump and liquid level sensor, and the DC-DC chip LM2596 is selected to reduce the 12V voltage to a stable 5V voltage, providing voltage for the single-chip system and other peripheral systems.
2. Main control circuit design:
STC89C52 single-chip microcomputer is a high-performance, low-power 8-bit single-chip microcomputer with high performance, low power consumption, large capacity, multiple interfaces, powerful timers, and rich peripherals. Therefore, STC89C52 single-chip microcomputer is selected as the system master in this design. In the design of the main control circuit, a button reset circuit is provided. When the single-chip system is running and the program runs away due to environmental interference, the reset button is pressed and the internal program automatically starts from the beginning. The operation of the single-chip microcomputer must rely on a stable clock pulse, and an external crystal oscillator circuit is still necessary. The P0 port of STC89C52 is an open-drain output. When used as a bus expansion, no pull-up resistor is required. When used as an I/O port, a pull-up resistor is required. In this design, it is used as the data transmission port of LCD1602, so a row of pull-up resistors needs to be added to the P0 port.
3. LCD1602 display circuit design:
LCD1602 is a common character liquid crystal display that can easily display regular character information. It has the characteristics of low power consumption, easy control, and convenient display of regular character information. In this design, LCD is used to display real-time time, liquid level, operation mode, water pump status and other information.
4. LED indicator circuit design:
There are several indicator lights on common equipment to monitor the status and operation of the equipment. These indicator lights are called light-emitting diodes (LEDs). Fully understanding the meaning of these indicator lights can often easily and quickly determine the cause of the fault during network fault diagnosis, achieving unexpected results. In this design, there are 5 LED indicators, which respectively indicate the power indicator, manual mode, automatic mode, water inlet, water outlet and other states. 
5. Keyboard circuit design:
The key circuit refers to a circuit that controls electronic equipment. In the circuit, the device can be turned on, off, adjusted, switched and other operations by pressing the key. The main function of the key circuit is to control various operations of electronic equipment, such as turning on and off, adjusting the volume, switching channels, etc. In this design, there are 5 keys, one of which is used as a reset key. The other four keys are independent keys, which are reused by the program as mode switching, water inlet, water outlet, upper and lower limits of liquid level adjustment and other functions.
6. Alarm circuit design:
In this design, an active buzzer is used as an alarm, which is simple to operate. Since the driving current of the IO port of the single-chip microcomputer is not enough to drive the buzzer, the transistor S8050 is used to amplify the current to drive the buzzer.
7. Motor control circuit design:
Since a larger current is required to make the motor rotate, the power supply circuit of this system is not enough to provide such a large current for the motor. Therefore, a relay is used as a switch in this design, and the single-chip microcomputer controls the motor by controlling the relay, so as to achieve the effect of water pump filling and drainage.
8. Water level monitoring circuit design:
TLC1543 analog-to-digital converter adopts serial communication interface, has the characteristics of multiple input channels, high cost performance, easy to interface with single-chip microcomputer, and can be widely used in various data acquisition systems. The sensor used in this design is a submersible liquid level sensor, and the output signal is a current of 4mA-20mA.
9. Real-time clock circuit design:
DS1302 is a low-power real-time clock chip with trickle current charging capability launched by DALLAS, USA. It can count years, months, days, weeks, hours, minutes, seconds, and has multiple functions such as leap year compensation.
10. Program burning circuit design:
In this design, the onboard CH340N is used for program burning and serial port debugging. ! ! ! CH340N is independently powered! ! ! ! , and does not share the same power supply with the system. The single-chip microcomputer uses power-on reset to burn the program during burning. After testing, the reset button cannot achieve the effect of burning the program, but it can still reset the system. As for why the program cannot be burned, the reason is unknown.
 
PCB design instructions
! !!!
...













 

 

 
 

​! ! TLC1543 failed to verify the corresponding code sensor experiment (the reason has not been found yet, maybe I bought a pirated chip). There is no problem with the hardware part. Due to time reasons, I was in a hurry to submit the course project, so I did not use the sensor to collect the information of the liquid level, but simulated the liquid level value by manually giving a value, and the same is true for water inlet and outlet (750ms minus 1 or plus 1).
 
Don't look at the BOM table, look at the device catalog table I uploaded
 
Demonstration video
 
[Course Design] Liquid Level Control System_Bilibili_bilibili
 
Other attachments uploaded
 
details see attachment
 
参考设计图片
×
 
Related Devices
Devices Class introduce Datasheet
STC89C52RC-40I The embedded processor and controller Working voltage: 3.3V ~ 5.5V CPU digits: 8-Bit CPU core: 8051 Main frequency (MAX): 80MHz ROM type: FLASH Download
X49SD12MSB2SI Analog mixed-signal IC;Into the crystal resonator (passive) Frequency tolerance: ±10ppm Load capacitance value: 20pF Main frequency: 12MHz Equivalent series resistance (ESR): 40 Ohm (Max) -40~85 degrees Industrial grade 12MHZ 20PF ±10PPM YXC 49S crystal oscillator Download
CL21A106KBYQNNE Download
DS1302N Download
LM2596SX-5.0/NOPB Power/power management;The power supply circuit Output current: 3A Switch operating frequency: 150kHz Output type: Fixed Number of output voltage channels: 1 Function type: Step-Down Output configuration: Positive Download
EEEFP1V221AP Passive components;capacitor Capacitance: 220uF Accuracy: ±20% Rated voltage: 35V Download
EEEFT1E471GP Passive components;Patch type aluminum electrolytic capacitors Capacitance: 470uF Accuracy: ±20% Rated voltage: 25V 850mA (ripple current rms)/80mΩ (ESR) Download
S8050 Discrete semiconductor;triode Transistor type: NPN Collector current Ic: 500mA Collector-emitter breakdown voltage Vce: 25V Rated power: 225mW NPN Download
SRD-12VDC-SL-C accessories;relay Contact form: SPDT Contact rated current: 10A Coil type: Non Latching Coil voltage: 12VDC Relay type: General Purpose. 12V relay Download
1N4007 Discrete semiconductor;General diode DC reverse withstand voltage (Vr): 1kV Average rectified current (Io): 1A Forward voltage drop (Vf): 1.1V @ 1A 1000V, 1A, VF=1.1V@1A Download
TLC1543CDWR Analog mixed-signal IC;converter Input type: Single Ended Number of inputs: 11 Sampling rate (sps): 38K A/D number of digits: 10 Download
1N4734A Discrete semiconductor;diode Accuracy: ±5% Voltage regulation value (typical value): 5.6V Reverse leakage current: 10uA @ 2V Maximum power: 1W Download
X308032768KGB2SC Analog mixed-signal IC;The cylinder crystals Frequency tolerance: ±10ppm Load capacitance value: 12.5pF Main frequency: 32.768KHz Download
1N5819 Discrete semiconductor;Schottky diode DC reverse withstand voltage (Vr): 40V Average rectified current (Io): 1A Forward voltage drop (Vf): 600mV @ 1A 40V, 1A, VF=0.6V@1A Download
USB-MR-D-015 The USB connector Download
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2024-11-15 01:40:58

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号