基于单片机的液位监控系统毕业设计 下载本文

内容发布更新时间 : 2024/12/26 1:40:53星期一 下面是文章的全部内容请认真阅读。

河南理工大学毕业设计(论文)说明书

摘 要

本文设计的基于单片机的液位监控系统是一种利用超声波技术、电子技术、电磁开关技术相结合来实现非接触式液位测量和控制系统,能够在某些特定场合或环境比较恶劣的情况下使用,在工业监测和控制等方面得到了广泛应用。近些年来,工业水平的不断发展对液位测量的精度、广度和抗干扰性提出了越来越高的要求,超声波测距技术本身也在不断的完善和发展,测距仪更趋向小型化和智能化,逐步实现了高精确度、高可靠性、安全性和多功能化。

本设计的主要任务是以单片机为主控制器,开发一个基于单片机的液位监控系统,可测量并显示液位,还可以通过单片机控制把液位限定在某一范围内,在单片机控制失效的情况下发出报警信号,提醒工作人员进行手动控制。研究内容包括超声波测距的基本原理与方法、精度影响因素的分析与解决办法、单片机对阀门的控制方法、监控系统的整体方案设计、硬件设计、软件流程设计等。设计完成之后提供一套可以使用的超声波测距仪,测量范围和测量精度满足一般工业应用需要。设计完成之后应提供一套可以用于一般工业生产的液位监控系统。通过毕业设计的整个过程,可以综合运用传感器、单片机、电子电路和程序设计方面的知识,锻炼和提高动手能力、参与科研工作的能力。

关键词:单片机 超声波 测距 液位监控

1

河南理工大学毕业设计(论文)说明书

Abstract

The monolithic machine-based liquid place supervisory control system the main body of a book is designed has been that one kind of the contact-type liquid making use of the ultrasonic technology , electron technology , electromagnetism switch technology to realize combining with coming each other place measures and controls system , has been able to be put into use under some specially appointed occasion or environment is comparatively very bad situation , has got extensive use in the field of industry monitoring and controlling and so on. Horizontal uninterrupted growth of industry has brought forward the more and more high request to accuracy , extent and anti-interference sex that the liquid place measures in recent year, self can't be in the ultrasonic distance measurement technology perfect ceaseless and developed, the range finder is incline to minaturized and intellectualized , step by step have realized high precision , high reliability , security and multifunctional-rization.

This design's primary mission is by the monolithic integrated circuit primarily controller, develops one based on monolithic integrated circuit's fluid position supervisory system, measurable quantity and disclosing solution position, but may also through the monolithic integrated circuit control the fluid position define that in some scope, the situation which expires in the monolithic integrated circuit control after-crops the alarm, the reminder staff carries on the hand control. Research content including ultrasonic ranging's basic principle and method, precision influencing factor analysis and solution, monolithic integrated circuit to valve control method, supervisory system's overall plan design, hardware design, software flow design and so on. After the design completes, provides the ultrasonic wave distance gauge which a set may use, the measuring range and the measuring accuracy meet the general industrial application needs. After the design completes, should provide a set to be possible to use in the general industrial production the fluid position supervisory system. Through graduation project's entire process, may

2

河南理工大学毕业设计(论文)说明书

synthesize the utilization sensor, the monolithic integrated circuit, the electronic circuit and the programming aspect knowledge, the exercise and enhancement beginning ability, participation scientific effort ability.

Keywords:Monolithic machine Ultrasonic Distance measurement The place monitors liquid

3

河南理工大学毕业设计(论文)说明书

目 录

摘 要 ............................................................. 1 Abstract ........................................................... 2 1 绪 论 ........................................................... 1

1.1意课题的提出和义 ............................................ 1

1.1.1 课题的提出 ............................................ 1 1.1.2 课题意义 .............................................. 1 1.2 国内外液位监测技术的发展现状 ............................... 1 1.3 国内外超声波测距方面的研究现状 ............................. 3 1.4 本文的主要内容 ............................................. 3 2 超声波液位测量的理论基础 ......................................... 5

2.1 超声波的定义 ............................................... 5 2.2 超声波的物理特性 ........................................... 5

2.2.1 超声波的类型 .......................................... 5 2.2.2 超声波的传播 .......................................... 5 2.3 超声波液位测量原理 ......................................... 6 2.4 超声波测距原理 ............................................. 6

2.4.1 超声波回波检测法 ...................................... 6 2.4.2 发射脉冲波形 .......................................... 7 2.4.3 超声波渡越时间的计量方法分析 .......................... 7 2.5 超声波接收发射装置 ......................................... 8 3 超声波液位监控系统硬件设计 ...................................... 10

3.1 系统总体方案设计 .......................................... 10 3.2 超声波测距系统的硬件设计 .................................. 11

3.2.1 超声波频率的选择 ..................................... 11 3.2.2 单双探头的选择 ....................................... 11 3.2.3 超声波发射电路 ....................................... 11 3.2.4 超声波的接收和处理单元 ............................... 15

4

河南理工大学毕业设计(论文)说明书

3.2.5 温度补偿单元 ......................................... 18 3.2.6 显示电路设计 ......................................... 23 3.2.7 键盘电路设计 ......................................... 24 3.2.8 电磁阀控制电路设计 ................................... 24 3.2.9 报警电路设计 ......................................... 25 3.2.10 系统控制单元 ........................................ 25 3.3 电源电路的设计 ............................................ 27

3.3.1 直流稳压电源的组成 ................................... 27 3.3.2 直流稳压电源的分类 ................................... 28 3.3.3 系统供电电源的设计 ................................... 28 3.4 液位监控系统的软件设计 .................................... 30

3.4.1 系统软件总体设计思想 ................................. 30 3.4.2 主程序流程设计 ....................................... 31 3.4.3 测温子程序设计 ....................................... 31 3.4.4 按键子程序设计 ....................................... 35 3.4.5 显示子程序设计 ....................................... 36 3.5 抗干扰设计 ................................................ 39 4 超声波测液位的误差分析 .......................................... 40

4.1 环境对测量的影响 .......................................... 40

4.1.1 温度对声速的影响 ..................................... 40 4.1.2 湿度对超声波衰减程度的影响 ........................... 42 4.2 仪器电路对测量的影响 ...................................... 42

4.2.1 硬件电路引起的时间误差及修正 ......................... 42 4.2.2 触发时间引起的误差 ................................... 42

5 总结 ............................................................ 44 致 谢 ............................................................. 45 参考文献 .......................................................... 46 附图1 ............................................................ 47 附图2 ............................................................ 47

5