摘要:液体的液位测量在工业生产中非常普遍,应用领域也较为广泛。液位测量的方法根据液位传感器的不同有很多种。随着新型电子技术、微电子技术和微型计算机的飞速发展,单片微型计算机以其信号采集处理精度高、速度快、性能稳定可靠、设置操作方便、造价低等诸多特点而被广泛的应用到液位检测和控制系统中来。本文基于单片微型计算机和超声波测距工作原理,设计出一种以STC89C52单片微型计算机芯片作为主控元件的超声波液位检测系统。该系统具有结构简单,较好的稳定性,操作方便且易于文护等优点。它可以对液位传感器采集的液位信号进行处理并驱动显示、报警和液位控制模块,实现了在封闭环境中对液位的实时检测和自动控制。7394
关键词: 液位检测;单片微型计算机;液位传感器;超声波
Liquid Level Detection Based on 51 Core MCU
Abstract: Liquid level detection of liquid is very common in industrial production, and its application field is also extensive. There are many kinds of level measurement methods according to different liquid level sensor. With the rapid development of new electronic technology, microelectronics technology and miniature computers, single chip control system has been widely applied to the liquid level detection and control system because of its many characteristic including high Signal acquisition and processing accuracy, fast speed, reliable performance, convenient operation and low cost and so on. Based on single-chip microcontroller and ultrasonic ranging operational principles, STC89C52 SCM-based ultrasonic liquid level measuring system was designed. The advantages of the system lie in its simple structure, a good stability, convenient operation and easy maintenance and so on. It can deal with liquid level signals which are collected by liquid level sensor and drive display, alarm, liquid level control modules, making liquid level detection and automatic control in a closed environment come true.
Keywords: liquid level detection; single chip microcomputer; liquid level sensor; ultrasonic
目 录
1 绪论 1
1.1 课题研究背景和目的 1
1.2 国内外研究现状和发展趋势 2
1.2.1 国内外研究现状 2
1.2.2 发展趋势 2
1.3 设计的方法和过程 2
1.3.1 设计的方法 2
1.3.2 设计的过程 3
1.4 设计研究的内容和要求 3
2 系统设计方案 4
2.1 主控模块设计方案 4
2.2 显示模块设计方案 9
2.3 液位传感模块设计方案 10
2.4 温度传感模块设计方案 13
2.5 电机控制模块设计方案 13
3 硬件电路设计 15
3.1 硬件电路工作原理和总体设计框图 15
3.2 系统总体电路设计 16
3.3 硬件电路各模块设计 16
3.3.1 硬件电路设计平台 16
3.3.2 单片机外围复位与时钟电路 17
3.3.3 HC-SR04超声波传感器的测距电路设计 18
3.3.4 DS18B20温度检测电路设计 18
3.3.5 LCD1602显示电路 19
3.3.6 按键控制电路 20
3.3.7 报警电路 20
3.4 硬件电路总结 21
4 软件设计 22
4.1 软件设计平台 22
4.2 软件程序设计总体流程图 23
4.3 软件各模块设计 24
4.3.1 主程序 24
4.3.2 检测子程序 26 STC89C52单片机的液位检测系统设计+电路图:http://www.751com.cn/zidonghua/lunwen_5352.html