资讯详情

超声波自动测量物体液位系统的设计

超声自动测量物体液位系统的设计(任务书,毕业论文1.5万字)

摘要

本系统以STC89C以单片机为核心,通过编写硬件电路连接和软件程序,实现一般超声自动测量物体液位系统的设计。其主要原理是单片机控制超声波发射电路发射超声波,超声波接收电路接收液位后反射的超声波回波,单片机计时时间, 将测量时间带入相应公式,即可获得当前液位;使用按钮可手动设置容器深度,或在容器空时自动测量容器深度,设计一般液位检测仪;DS18B20测温模块实现当前空气温度的测量;最后,通过LCD液位和温度不断更新显示12864液晶。如果液位超过预设的最高值,同时LED亮起报警。

包括硬件STC89C超声波测距部分,52单片机, LCD12864液晶显示部分,DS18B20测温部分,按键部分和LED报警部分。软件设计分为主程序和中断子程序两部分。主程序完成初始化、超声波发射和接收、距离计算、时间值读取、结果显示等工作。

关键词:超声波测距;单片机;液位测量;温度补偿;一般液位测量系统

Abstract

This system use STC89C52 microcontroller as the core, through a combination of hardware and written of software program, achieve the design of general type liquid level measurement system. The main principle is controlled by the microcontroller ultrasonic transmitter circuit launch ultrasound and receives the echo reflected surface encountered while recording the time used microcontroller. Take the measured time into the appropriate formula to obtain the current level. We can set the depth of the container by keys. It is also very convenient to automatically measure the depth of containers by pressing a key when the containers are empty. So that, we can achieve a general type liquid level measurement system. The DS18B20 module can test the current temperature, and put the measured temperature into the temperature compensation formula can making the measurement more accurate results. Last updated through the LCD liquid crystal display the current level and the temperature. If the level exceeds the preset maximum value, LED display a warning red light alarm.

STC89C52 microcontroller hardware including, ultrasonic distance measuring module, LCD12864 module, DS18B20 temperature test module, keys module and the LED alarm module. Software design is divided into two parts, the main program and interrupt service routine. Main program to initialize, transmit and receive ultrasound, distance calculation, get the time and the results display most of the major work. Interrupt service routine mainly finish the work of alrm.

Key words: Ultrasonic distance measurement; SCM; liquid level measurement; Temperature Compensation; Universal liquid level measurement system

2bcc362f0038c8d04f8399eba78646e1.png

目录

第一章 绪论1

1.1 课题的意义和背景1

1.2 液位测量系统现状1

1.3 国内外液位监测技术的发展方向和发展现状2

1.4 本章小结3

第二章 超声波测量液位系统4

2.1 超声波和超声波传感器4

2.2 超声波测量液位原理4

2.2.1 超声测距原理4

2.2.2 超声波测量液位原理5

2.3 总体方案设计6

2.4 本章小结6

第三章 7.硬件系统设计

3.1 单片机系统7

3.1.1 单片机系统概述7

3.1.2 STC89C52单片机7

3.2 发射电路比10

3.3 接收电路比较11

3.4 超声波模块13

3.4.1 超声波模块的工作原理和特点13

3.4.2 超声波模块的内部结构和工作顺序14

3.5 LCD1664液晶显示模块

3.6 温度测量模块17

3.7 报警模块18

3.8 按键设置模块19

3.9 系统电路连接19

3.10 本章小结20

第四章 软件系统设计21

4.1 总体设计理念21

4.2 系统主程序22

4.3 温度补偿子程序22

4.4 基于LCD12864显示子程序23

4.5 按键设置子程序24

4.6 基于DS18B20测温子程序26

4.7 报警子程序27

4.8 本章小结27

第五章 28系统调试分析

5.1 硬件调试28

5.2 解决28个故障问题

5.3 实验数据29

5.4 误差分析30

结论31

参考文献32

致谢33

标签: 液位传感器解决

锐单商城拥有海量元器件数据手册IC替代型号,打造 电子元器件IC百科大全!

锐单商城 - 一站式电子元器件采购平台