基于C51单片机的超声波液位检测系统.doc
文本预览下载声明
毕业设计(论文)
目录
摘 要 3
第1章 绪论 5
1.1 课题研究的背景及意义 5
1.2 国内外发展的现状 7
1.3 液位计的类型 7
1.4 本课题的研究内容主要包括: 9
第2章 总体设计方案及任务要求 9
2.1 总体方案设计 9
2.2课题设计的任务要求: 10
第3章 单片机STC89C52 11
3.1 STC89C52单片机的构成 11
3.1.1 引脚功能: 12
第4章 硬件实现及单元电路设计 13
4.1 主控制模块 13
4.2 电源设计 14
4.3 超声波测试模块 14
4.4.1 超声波的特性 15
4.4.2 超声波换能器 16
4.4 超声波传感器原理 18
4.5 测距分析 21
4.6 时钟电路的设计 23
4.7 复位电路的设计 23
4.8 声音报警电路的设计 23
4.9 显示模块 24
第5章 软件设计 25
5.1 主程序工作流程图 25
总结 28
参考文献 28
致谢 29
附 录 30
附件1:原理图 30
附件2:程序 31
附件3:元件清单 43
附件4:PCB图 44
附件5:实物图 45
摘 要
超声波液位测量是一种非接触式的测量方式,它是利用超声波在同种介质中传播速度相对恒定以及碰到障碍物能反射的原理研制而成的。与其它方法相比(如电磁的或光学的方法),它不受光线、被测对象颜色的影响,对于被测物处于黑暗、有灰尘、烟雾、电磁干扰、有毒等恶劣的环境下有一定的适应能力。因此,研究超声波在高精度测距系统中的应用具有重要的现实意义。
本设计基于单片机的超声波液位测量系统主要由硬件与软件两部分组成,硬件是基于STC89C52芯片为核心的超声波液位测量,采用STC89C52单片机进行控制及数据处理,给出了超声波发射和接收电路,通过盲区的消除以及环境温度的采样,提高了测距的精确度。利用超声波传输中距离与时间的关系,设计出了能精确测量两点间距离的超声波液位检测系统。此系统具有易控制、工作可靠、测量精度高的优点,可实时检测液位。 并有超声波处理模块组成的超声波发射电路、超声波接收电路、单片机复位电路、LED显示电路、报警电路等。软件部分由主程序、预置子程序、发射子程序、接收子程序、显示子程序组成。各探头的信号经单片机综合分析处理。
最后通过实物的调试,各项参数及功能符合设计要求,能达到预期的目的。
关键词:单片机,超声波,温度控制,高精度测距
Abstract
The ultrasonic liquid level measurement is a non-contact measurement method, realized by the principle of ultrasonic wave in the same medium with relatively constant propagation velocity and being reflected when it approaches an obstacle. Compared with other methods (such as electromagnetic or optical method), it has a certain of adaptability when objects to be measured are under such harsh environment as darkness, dust, smoke, electromagnetic interference, toxicity, unaffected by the light or the color of the object to be measured. Therefore, it bears important practical significance to conduct research on the application of ultrasonic wave in high precision ranging system.
In this project, SCM-based ultrasonic liquid level measuring system is mainly composed of two components, namely the hardware and the software. The hardware is ultrasonic liquid level measurement based on STC89C52 chip as the core; it adopts STC89C52 si
显示全部